Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
router.post('/deleteUser', function(req, res, next) {
User.remove({_id : req.body.id}, function(err) {
if (err) {
console.log("not removed!");
res.status(400);
res.send();
}
console.log("removed!");
res.send({status: 'ok'});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment