populate student license working with websocket

parent 62e60852
......@@ -950,6 +950,9 @@ module.exports = {
return res.serverError("Error updating active scene");
}
else{
Student.findOne({id:params.id_stu})
.populate('license')
.then(student => {
// Send websocket message
sails.hooks.events.broadcastEvent(
sails.hooks.rooms.student(student.id),
......@@ -957,6 +960,7 @@ module.exports = {
(req.isSocket) ? req.socket : undefined
);
return res.ok(student);
});
}
})
}).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