Comparing version 0.7.2 to 0.7.3
@@ -98,2 +98,5 @@ exports.definition = function(modelName) { | ||
update: function(req, res) { | ||
var id = req.param('id'); | ||
if(!id) return res.send('No id specified!'); | ||
// Create monolithic parameter object | ||
@@ -103,9 +106,5 @@ var params = _.extend(req.query || {}, req.params || {}, req.body || {}); | ||
var id = req.param('id'); | ||
if(!id) return res.send(404); | ||
// Ignore id in params | ||
delete params['id']; | ||
Model.find(id).done(function(err, model) { | ||
console.log("found", model); | ||
}); | ||
Model.update({ | ||
@@ -115,3 +114,3 @@ id: id | ||
if(err) return res.send(err, 500); | ||
if(!model) return res.send('Model cannot be found.', 500); | ||
if(!model) return res.send('Model cannot be found.', 404); | ||
@@ -118,0 +117,0 @@ // Broadcast success message |
@@ -26,3 +26,3 @@ { | ||
], | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "API-driven framework for building realtime apps, using MVC conventions (based on Express and Socket.io)", | ||
@@ -29,0 +29,0 @@ "homepage": "http://sailsjs.com", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171841
2433