From ea2a57349223bb92b69e8637539f772f2add2064 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 17 Jan 2017 11:37:11 +0900 Subject: [PATCH] Fix bug --- src/api/private/signup.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/api/private/signup.ts b/src/api/private/signup.ts index 1eb6abfe9..53d9e369a 100644 --- a/src/api/private/signup.ts +++ b/src/api/private/signup.ts @@ -33,6 +33,12 @@ export default async (req: express.Request, res: express.Response) => { return; } + // Validate password + if (password == '') { + res.sendStatus(400); + return; + } + // Fetch exist user that same username const usernameExist = await User .count({