mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
fix: not returning
This commit is contained in:
parent
c8443ad441
commit
3eebd17989
@ -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 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user