diff --git a/src/socket.io/admin.js b/src/socket.io/admin.js index f4d11f6d4b..eddfd78342 100644 --- a/src/socket.io/admin.js +++ b/src/socket.io/admin.js @@ -120,7 +120,7 @@ SocketAdmin.categories.create = function(socket, data, callback) { SocketAdmin.categories.update = function(socket, data) { if(!data) { - return callback(new Error('invalid data')); + throw new Error('invalid data'); } admin.categories.update(data, socket); @@ -380,4 +380,4 @@ SocketAdmin.groups.update = function(socket, data, callback) { }); }; -module.exports = SocketAdmin; \ No newline at end of file +module.exports = SocketAdmin;