Skip to content

Instantly share code, notes, and snippets.

@sespinosa
Last active March 23, 2018 21:57
Show Gist options
  • Save sespinosa/db1b325b539bec7a4ffdfec79d85baed to your computer and use it in GitHub Desktop.
Save sespinosa/db1b325b539bec7a4ffdfec79d85baed to your computer and use it in GitHub Desktop.
App.findById(id, (err, app) => {
Object.assign(app.config, req.body) // Aca mutamos el objeto app original.
app.save(err => {
if(err) return res.status(500)
if(!app) => return res.status(404)
res.status(200).send(app)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment