diff --git a/backend/app/routes/admin/updateAdmin.js b/backend/app/routes/admin/updateAdmin.js index a86ee652..e7bb5096 100644 --- a/backend/app/routes/admin/updateAdmin.js +++ b/backend/app/routes/admin/updateAdmin.js @@ -33,7 +33,7 @@ module.exports =async (req, res) => { { $set: updateFields }, { new: true } ); - res.status(200).json({updatedAdmin,"Req.Body":updateFields}); + res.status(200).json({"Req.Body":updateFields}); } catch (err) { res.status(500).json(err); } diff --git a/frontend/src/pages/Admin/Admin.jsx b/frontend/src/pages/Admin/Admin.jsx index 48dcb06e..8138b925 100644 --- a/frontend/src/pages/Admin/Admin.jsx +++ b/frontend/src/pages/Admin/Admin.jsx @@ -50,7 +50,6 @@ export const Admin = (props) => { }; const response = await axios.get(baseUrl, { params, headers }); - // image retrieving let formattedPath = response.data[0].image?.replace(/\\/g, "/"); if (formattedPath?.startsWith("uploads/")) { formattedPath = formattedPath.replace("uploads/", "");