Created
September 6, 2018 23:02
-
-
Save aguileraq/e310a999b4307c861af13d79337ee92c 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
Historial.findById(req.params.id) | |
.populate("incidencia") | |
.exec() | |
.then(incidencias =>{ | |
if (!incidencias) { | |
return res.status(404).json({ | |
message: "No hay incidencias..." | |
}); | |
} | |
Incidencia.populate(incidencias.incidencia.cupon, {path:"cupones"}, function(err, info) { console.log('cupones',info) }); | |
res.render("incidencia/edit_incidencia", {data:incidencias}); | |
}) | |
.catch(err => { | |
res.status(500).json({ | |
error: err | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment