diff --git a/auth/src/routes/signup.ts b/auth/src/routes/signup.ts index 750587d..892fc7e 100644 --- a/auth/src/routes/signup.ts +++ b/auth/src/routes/signup.ts @@ -24,7 +24,9 @@ router.post( const errors = validationResult(req); if (!errors.isEmpty()) { - return res.send(errors.array({ onlyFirstError: true })[0].msg); + return res + .status(400) + .send(errors.array({ onlyFirstError: true })[0].msg); } const { username, email, password, role } = req.body; diff --git a/meetings/src/routes/new.ts b/meetings/src/routes/new.ts index 3aa5e64..6f4ae71 100644 --- a/meetings/src/routes/new.ts +++ b/meetings/src/routes/new.ts @@ -17,7 +17,9 @@ router.post( const errors = validationResult(req); if (!errors.isEmpty()) { - return res.send(errors.array({ onlyFirstError: true })[0].msg); + return res + .status(400) + .send(errors.array({ onlyFirstError: true })[0].msg); } let resV;