Created
October 8, 2017 19:28
-
-
Save NMZivkovic/6d595e84ab4e9028392b7db17315bcf7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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