Created
May 4, 2020 19:46
-
-
Save OdongAlican/50deae94201b6de6d6a2f58b66c7e527 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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