From 75e4c8d74df95d0c0c0fd904c1e7a08cd3cf8103 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 21 Aug 2018 23:56:15 +0900 Subject: [PATCH] Better reponse --- src/server/api/private/signin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/api/private/signin.ts b/src/server/api/private/signin.ts index 65413208dd..9f26c09c45 100644 --- a/src/server/api/private/signin.ts +++ b/src/server/api/private/signin.ts @@ -63,7 +63,7 @@ export default async (ctx: Koa.Context) => { if (verified) { signin(ctx, user); } else { - ctx.throw(400, { + ctx.throw(403, { error: 'invalid token' }); } @@ -71,7 +71,7 @@ export default async (ctx: Koa.Context) => { signin(ctx, user); } } else { - ctx.throw(400, { + ctx.throw(403, { error: 'incorrect password' }); }