Skip to content

Commit

Permalink
#update functionality admin page
Browse files Browse the repository at this point in the history
  • Loading branch information
SwayamRana808 committed May 19, 2024
1 parent d86d66f commit b3d4161
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion backend/app/routes/admin/updateAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/Admin/Admin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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/", "");
Expand Down

0 comments on commit b3d4161

Please sign in to comment.