diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-10 06:42:57 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-10 06:42:57 +0900 |
| commit | a67758e5afeaf1fcb80b9732c9fb40a15013aeb4 (patch) | |
| tree | ffa91a967af8c794e08f52aa319775e8b903a79c /src/api | |
| parent | fix (diff) | |
| download | sharkey-a67758e5afeaf1fcb80b9732c9fb40a15013aeb4.tar.gz sharkey-a67758e5afeaf1fcb80b9732c9fb40a15013aeb4.tar.bz2 sharkey-a67758e5afeaf1fcb80b9732c9fb40a15013aeb4.zip | |
Fix #238
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/private/signin.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/api/private/signin.ts b/src/api/private/signin.ts index fe3b5f7084..afa83e50c3 100644 --- a/src/api/private/signin.ts +++ b/src/api/private/signin.ts @@ -33,7 +33,9 @@ export default async (req: express.Request, res: express.Response) => { }); if (user === null) { - res.status(404).send('user not found'); + res.status(404).send({ + error: 'user not found' + }); return; } @@ -53,7 +55,9 @@ export default async (req: express.Request, res: express.Response) => { res.sendStatus(204); } else { - res.status(400).send('incorrect password'); + res.status(400).send({ + error: 'incorrect password' + }); } // Append signin history |