authentication implemented

This commit is contained in:
Moon Patel
2023-06-27 18:28:24 +05:30
parent b3fd3ade5c
commit 02b302e2c8
7 changed files with 179 additions and 3 deletions
+1
View File
@@ -31,6 +31,7 @@ router.post("/signup", async (req, res, next) => {
if (user) errors.username = "Username already exists";
if (Object.keys(errors).length > 0) {
console.log(errors);
return res.status(422).json({
message: "User signup failed due to validation errors.",
errors,