From 9ad277c784046033226f6f304fea37d1b1a9287f Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Sun, 19 Nov 2023 22:32:23 -0500 Subject: [PATCH] bug fixed --- lib/api/controllers/users/postUser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api/controllers/users/postUser.ts b/lib/api/controllers/users/postUser.ts index 22e52eca..f24738bb 100644 --- a/lib/api/controllers/users/postUser.ts +++ b/lib/api/controllers/users/postUser.ts @@ -30,7 +30,7 @@ export default async function postUser( ? !body.password || !body.name || !body.email : !body.username || !body.password || !body.name; - if (body.password.length < 8) + if (!body.password || body.password.length < 8) return res .status(400) .json({ response: "Password must be at least 8 characters." });