SHARE
TWEET

Untitled

a guest Oct 21st, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // make sure we return the updated person, with tags fully populated
  2.   return Person.findOne({ _id: userID }).populate('tags').lean().exec((_err, got) => {
  3.     if (!got) { // person does not exist
  4.       return res.status(404).send({ error: 'person not found' })
  5.     }
  6.     req.crudify.result = got
  7.     next()
  8.   })
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
 
Top