Skip to content

Commit

Permalink
remove old handle error
Browse files Browse the repository at this point in the history
relates #24
  • Loading branch information
MohammedAlghazali committed Mar 31, 2020
1 parent 45e32b7 commit 54aeed9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions server/controllers/routes/admin/project/addProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 54aeed9

Please sign in to comment.