Advertisement
meanbao

Untitled

Nov 27th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CoffeeShop.findOneAndUpdate(query, update, options)
  2.     .then(updatedShop => {
  3.         console.log(updatedShop);
  4.     })
  5.     .catch(err => {
  6.         console.log(err);
  7.     })
  8.  
  9. CoffeeShop.findOneAndRemove({"address": "123 Main St."})
  10.     .then(removedShop => {
  11.         console.log(removedShop);
  12.     })
  13.     .catch(err => {
  14.         console.log(err);
  15.     })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement