Skip to content

Commit 92ef694

Browse files
committed
fix: fixes json responses
1 parent 9670d54 commit 92ef694

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/utils/sendResponse/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/sendResponse/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const sendEnvelopedResponse = ({
5454
return res.json(data);
5555
}
5656

57-
return res.json(JSON.stringify(data, null, 2));
57+
return res.send(JSON.stringify(data, null, 2));
5858
};
5959

6060
export const sendNormalResponse = ({
@@ -83,7 +83,7 @@ export const sendNormalResponse = ({
8383
return res.json(responseObject[config.dataKeyName]);
8484
}
8585

86-
return res.json(JSON.stringify(responseObject, null, 2));
86+
return res.send(JSON.stringify(responseObject, null, 2));
8787
};
8888

8989
const sendResponse = ({ config = defaultConfig, ...rest }: Options) =>

0 commit comments

Comments
 (0)