Skip to content

Commit

Permalink
Update State
Browse files Browse the repository at this point in the history
  • Loading branch information
bensonarafat committed Oct 14, 2023
1 parent a0c17bc commit 49216ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 28 deletions.
6 changes: 5 additions & 1 deletion src/controllers/state.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ const State = model.stateModel;
stateController.all = async (req, res) => {
try {
let _state = await State.find();
res.status(200).json(_state);
const clean = _state.map((s) => {
const {_id, rest} = s;
return rest;
});
res.status(200).json(clean);
} catch (_) {
res.status(500).json({message: "Server Error"});
}
Expand Down
27 changes: 0 additions & 27 deletions src/controllers/weclome.controller.js

This file was deleted.

0 comments on commit 49216ae

Please sign in to comment.