how to check record successfully delete in mongodb node js

Solutions on MaxInterview for how to check record successfully delete in mongodb node js by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "how to check record successfully delete in mongodb node js"
Giacomo
20 Jul 2018
1Model.remove({ _id: req.body.id }, function(err) {
2    if (!err) {
3            message.type = 'notification!';
4    }
5    else {
6            message.type = 'error';
7    }
8});
9