mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 14:07:38 -07:00
Fix error response format
This commit is contained in:
parent
8e59da66d5
commit
fc6b5d2503
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ export default async (endpoint: IEndpoint, ctx: Koa.BaseContext) => {
|
|||
ctx.status = 204;
|
||||
} else if (typeof x === 'number') {
|
||||
ctx.status = x;
|
||||
ctx.body = y;
|
||||
ctx.body = { error: y };
|
||||
} else {
|
||||
ctx.body = x;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue