SHARE
TWEET

Untitled

a guest Oct 28th, 2016 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. app.get('/deleteOwner/:id', (req, res) => {
  2.   Owner
  3.     .findOne({ _id: req.params.id })
  4.     .then((owner) => {
  5.       console.log(owner)
  6.       owner
  7.         .remove()
  8.         .then(() => {
  9.           res.redirect('/all')
  10.         })
  11.     })
  12. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top