Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CoffeeShop.findOneAndUpdate(query, update, options)
- .then(updatedShop => {
- console.log(updatedShop);
- })
- .catch(err => {
- console.log(err);
- })
- CoffeeShop.findOneAndRemove({"address": "123 Main St."})
- .then(removedShop => {
- console.log(removedShop);
- })
- .catch(err => {
- console.log(err);
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement