summaryrefslogtreecommitdiff
path: root/src/api/private
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/private')
-rw-r--r--src/api/private/signup.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/api/private/signup.ts b/src/api/private/signup.ts
index 1eb6abfe9f..53d9e369ac 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({