mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +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.')
|
||||
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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user