Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // make sure we return the updated person, with tags fully populated
- return Person.findOne({ _id: userID }).populate('tags').lean().exec((_err, got) => {
- if (!got) { // person does not exist
- return res.status(404).send({ error: 'person not found' })
- }
- req.crudify.result = got
- next()
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement