fixed issue #552

parent 19086f8e
......@@ -46,6 +46,7 @@ module.exports = {
id_sup: <supervisor ID>
id_stu: <student ID>
id_ins: <instruction ID>
begin: <begin timestamp in ISO format>
* }
* @param {response} res
* {
......@@ -55,18 +56,19 @@ module.exports = {
create: function(req, res) {
var params = req.allParams();
sails.debug.log(JSON.stringify(params));
sails.log.debug(JSON.stringify(params));
if (!params.id_sup) res.badRequest("No supervisor defined");
if (!params.id_ins) res.badRequest("No instruction defined");
if (!params.id_stu) res.badRequest("No student defined");
if (!params.begin) res.badRequest("No start timestamp defined");
if (!params.desc) params.desc = "";
var data = {};
data.supervisor = params.id_sup;
data.instruction = params.id_ins;
data.description = params.desc;
sails.debug.log("BEGIN " + params.begin);
sails.log.debug("BEGIN " + params.begin);
data.begin = params.begin; // data comes in ISO format
StuOpenTry.findOne({or: [ // pending open try?
......
......@@ -177,4 +177,4 @@ dashboardApp.factory('newconfirm', function ($window, $q, $timeout) {
// force websocket transport protocol
io.sails.transports=['polling'];
//io.sails.transports=['polling'];
......@@ -12,7 +12,8 @@ String.prototype.hashCode = function() {
return hash;
};
io.sails.transports=['websocket'];
// force transport protocol for websockets
// io.sails.transports=['websocket'];
// Creamos el módulo dashboardControllers, de donde colgarán todos los controladores
var dashboardControllers = angular.module('dashboardControllers', ['dashboardConfig']);
......
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