fix: not returning

This commit is contained in:
원더 2021-01-24 10:13:23 +09:00
parent c8443ad441
commit 3eebd17989

View File

@ -8,7 +8,7 @@ export default function ResponseWrapper(
if (!http.STATUS_CODES[code]) throw new Error('Invalid http code.') if (!http.STATUS_CODES[code]) throw new Error('Invalid http code.')
res.statusCode = 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 { interface ResponseProps {