Skip to content

Commit

Permalink
Fixes #86
Browse files Browse the repository at this point in the history
  • Loading branch information
explodingcamera committed May 15, 2016
1 parent 3f56028 commit 69659c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions socketserver/socketserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,13 @@ var SocketServer = function(server){
break;
}
var res = that.room.queue.swap(user1Sock, user2Sock);
if(!res.data) {
returnObj.data = {
error: 'SwappingWithCurrentDJ'
};
socket.sendJSON(returnObj);
break;
}
res.data.mid = socket.user.uid;
returnObj.data = {
success: res.success
Expand Down
9 changes: 8 additions & 1 deletion webserver/public/lib/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3493,7 +3493,14 @@
};

obj.id = MP.addCallback(obj.type, function(err, data){
if (err){ if (callback) callback(err); console.log('Could not swap users in dj queue: ' + err); return;}
if (err) {
if (callback) callback(err);
MP.makeAlertModal({
content: 'Could not swap users in dj queue: ' + err,
dismissable: true
});
return;
}

if (callback) callback(err, data);
});
Expand Down

0 comments on commit 69659c5

Please sign in to comment.