Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@OdongAlican
Created May 4, 2020 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OdongAlican/50deae94201b6de6d6a2f58b66c7e527 to your computer and use it in GitHub Desktop.
Save OdongAlican/50deae94201b6de6d6a2f58b66c7e527 to your computer and use it in GitHub Desktop.
exports.delete = async function (req, res) {
await PostModel.remove((req.post), (err, removed) => {
if (err) {
res.status(400).send('post not deleted');
} else {
res.json(removed);
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment