Skip to content

Instantly share code, notes, and snippets.

@solexious
Created October 15, 2014 01:17
Show Gist options
  • Save solexious/2c7bdc7191dc67dde244 to your computer and use it in GitHub Desktop.
Save solexious/2c7bdc7191dc67dde244 to your computer and use it in GitHub Desktop.
socket.on('removeTeam', function (team){
if(team._id==undefined){
console.log('error,no team');
}
else{
console.log('removing team:');
console.log(team._id);
Booking.remove({ _id: team._id}, function (err, team){
if(err) console.log(err);
else{
socket.emit('teamRemovedSuccess', team);
socket.broadcast.emit('teamRemoved', team);
console.log(team._id);
}
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment