From d131a1efe37948d1949c9c2c0cd854a79fe631db Mon Sep 17 00:00:00 2001 From: MohammedAlghazali Date: Tue, 31 Mar 2020 21:10:25 +0300 Subject: [PATCH] modify status code for error relates #29 --- server/controllers/routes/admin/cohort/deleteCohort.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/controllers/routes/admin/cohort/deleteCohort.js b/server/controllers/routes/admin/cohort/deleteCohort.js index bbf52d0b..07709373 100644 --- a/server/controllers/routes/admin/cohort/deleteCohort.js +++ b/server/controllers/routes/admin/cohort/deleteCohort.js @@ -10,8 +10,8 @@ const deleteCohort = async (req, res, next) => { data: { message: 'Cohort deleted successfully' }, }); } else { - res.status(400).json({ - StatusCode: 400, + res.status(404).json({ + StatusCode: 404, data: { message: 'Cohort does not exist' }, }); }