Fix bug
This commit is contained in:
parent
988de1dd18
commit
ea2a573492
1 changed files with 6 additions and 0 deletions
|
@ -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({
|
||||
|
|
Loading…
Reference in a new issue