Skip to content

Commit

Permalink
Update Status name
Browse files Browse the repository at this point in the history
  • Loading branch information
bensonarafat committed Sep 11, 2023
1 parent 7e30e60 commit 75ee9a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/main.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ mainController.addItems = async (req, res) => {
let obj = {};
obj[type] = req.body.item;
const response = await State.findOneAndUpdate({_id: req.params.id}, { $push: obj });
res.status(200).json({message: "State Updated" , data : response});
res.status(200).json({message: "Item Added" , data : response});
} catch (_) {
res.status(500).json({message : "Oops, there was an error"});
}
Expand Down

0 comments on commit 75ee9a6

Please sign in to comment.