Skip to content

Commit

Permalink
Fixed destroy scaffold bug and enabled publish()ing of broadcastable …
Browse files Browse the repository at this point in the history
…socket events even they originate over http.
  • Loading branch information
mikermcneil committed Feb 25, 2013
1 parent df08eb8 commit 44eea4c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lib/pubsub.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ var pubsub = {
* Broadcast a message to sockets connected to the specified models
*/
publish: function (req,models,message) {
if (!req.isSocket) return;
var my = this;

// If no models provided, publish to the class room
Expand Down
2 changes: 1 addition & 1 deletion lib/scaffolds/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ exports.definition = function(modelName) {
if(err) return res.send(err, 500);
if(!model) return res.send(404);

Model.destroy(id, params).done(function(err) {
Model.destroy(id, function(err) {
if(err) return res.send(err, 500);

// Broadcast success message
Expand Down

0 comments on commit 44eea4c

Please sign in to comment.