Commit 64f9d759 by Jose Antonio

Create core when added scene

parent 304b2851
Showing with 9 additions and 0 deletions
...@@ -22,6 +22,15 @@ module.exports = { ...@@ -22,6 +22,15 @@ module.exports = {
supervisor: params.id_sup, supervisor: params.id_sup,
student: params.id_stu student: params.id_stu
}).then(scene=>{ }).then(scene=>{
if(scene.categories){
Model.query('CALL scene_create_core('+scene.id+','+scene.student+') ', function(err, result) {
if (err) {
return res.serverError("Could not call stored procedure create scene picto core "+err);
} else {
return res.ok(scene);
}
});
}
return res.ok(scene); return res.ok(scene);
}).catch(function (err){ }).catch(function (err){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment