pictos no mostrados en sesión, corregido

parent b791bd7d
......@@ -47,6 +47,9 @@ android {
LocalFlavor {
resValue "string", "server", "https://192.168.1.37:1337"
}
DevFlavor {
resValue "string", "server", "https://dev.yottacode.com"
}
DefaultFlavor {
resValue "string", "server", "https://pre.yottacode.com"
signingConfig signingConfigs.release_config
......
......@@ -1015,15 +1015,17 @@ module.exports = {
sails.log.debug("Inside action. Student:" + attributes.id_stu);
if (req.isSocket) {
sails.log.debug("websockets - room " + roomName);
sails.log.debug("websockets - room " + sails.hooks.rooms.student(attributes.id_stu));
// BROADCAST to everyone subscribed to this student
const socketToOmit = (req.isSocket) ? req.socket : undefined;
sails.hooks.events.broadcast(
sails.hooks.events.broadcastEvent(
sails.hooks.rooms.student(attributes.id_stu),
'action',
{
name: 'action',
data: {
"action": action,
"attributes": attributes
}
},
socketToOmit
);
......@@ -1043,8 +1045,10 @@ module.exports = {
description: desc
})
.exec(function (err, created) {
if (err)
if (err) {
sails.log.error(err.details);
res.serverError(err.details);
}
else if (created)
res.json({
action: created
......@@ -1056,6 +1060,8 @@ module.exports = {
msg: "Action "+ action +" action from student " + attributes.id_stu
});
*/
} else {
sails.log.debug("No socket request for action");
}
},
......@@ -1070,7 +1076,7 @@ module.exports = {
if (req.isSocket) {
const socketToOmit = (req.isSocket) ? req.socket : undefined;
sails.hooks.events.broadcast(
sails.hooks.events.broadcastEvent(
sails.hooks.rooms.student(attributes.id_stu),
'action',
{
......
// @TODO 357
module.exports = {
// create action
// create action
// adds a try
//
create: function(req, res) {
......
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