From 1452f367a0ec6be7ada8e005b78effeae2d0a046 Mon Sep 17 00:00:00 2001 From: swayamName1 Date: Sun, 19 May 2024 12:23:04 +0530 Subject: [PATCH] update functionality admin page --- backend/app/routes/admin/getAdmins.js | 2 +- backend/app/routes/admin/updateAdmin.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/app/routes/admin/getAdmins.js b/backend/app/routes/admin/getAdmins.js index bd2db55b..8aebb616 100644 --- a/backend/app/routes/admin/getAdmins.js +++ b/backend/app/routes/admin/getAdmins.js @@ -47,5 +47,5 @@ module.exports = async (req, res, next) => { return next(error); } res.status(200).send(response); - + return next(); }; diff --git a/backend/app/routes/admin/updateAdmin.js b/backend/app/routes/admin/updateAdmin.js index d5710334..427b1456 100644 --- a/backend/app/routes/admin/updateAdmin.js +++ b/backend/app/routes/admin/updateAdmin.js @@ -28,6 +28,7 @@ module.exports =async (req, res) => { res.status(200).json(updatedAdmin); } catch (err) { - res.status(500).json({err}); - } + res.status(500).json(err); + } + res.send('Done'); };