From 3eebd17989c9afe5249b71c65ebe50fedf5ab5c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Sun, 24 Jan 2021 10:13:23 +0900 Subject: [PATCH] fix: not returning --- utils/ResponseWrapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/ResponseWrapper.ts b/utils/ResponseWrapper.ts index e1a624c..4e33b5a 100644 --- a/utils/ResponseWrapper.ts +++ b/utils/ResponseWrapper.ts @@ -8,7 +8,7 @@ export default function ResponseWrapper( if (!http.STATUS_CODES[code]) throw new Error('Invalid http code.') res.statusCode = code - return { code, message: message || http.STATUS_CODES[code], data, errors, version } + res.json({ code, message: message || http.STATUS_CODES[code], data, errors, version }) } interface ResponseProps {