Created
April 3, 2016 07:51
-
-
Save nurfarazi/1eafee9a219f9af872b94be07a1f9acc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Student.findByIdAndUpdate( | |
req.body._id, { | |
$push: { | |
"comments": req.body.imagelink | |
} | |
}, | |
function (err, model) { | |
if (err) { | |
console.log(err); | |
res.send(err); | |
next(); | |
} else { | |
res.json(model); | |
next(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment