diff --git a/server/controllers/routes/admin/project/addProject.js b/server/controllers/routes/admin/project/addProject.js index f80d8370..a50ffdb7 100644 --- a/server/controllers/routes/admin/project/addProject.js +++ b/server/controllers/routes/admin/project/addProject.js @@ -3,12 +3,7 @@ const { projectSchema } = require('../../../../validation'); const addProject = async (req, res, next) => { try { - await projectSchema.validate(req.body).catch((err) => - res.json({ - StatusCode: 400, - data: { message: err.errors }, - }), - ); + await projectSchema.validate(req.body); await addProjectQuery(req.body); res.json({ StatusCode: 200,