Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

Commit

Permalink
fixed 500 when property is removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Camel Aissani committed May 3, 2021
1 parent 1662986 commit 26e8cf2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/managers/propertymanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ function remove(req, res) {
const ids = req.params.ids.split(',');

propertyModel.remove(realm, ids, (errors) => {
return res.status(500).json({ errors: errors });
if (errors) {
return res.status(500).json({ errors: errors });
}
res.sendStatus(200); // better to return 204
});
}

Expand Down

0 comments on commit 26e8cf2

Please sign in to comment.