how to check record successfully delete in mongodb node js code example
Example: how to check record successfully delete in mongodb node js
Model.remove({ _id: req.body.id }, function(err) {
if (!err) {
message.type = 'notification!';
}
else {
message.type = 'error';
}
});