mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 03:51:26 +01:00
fix error with undefined callback
This commit is contained in:
@@ -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;
|
||||
module.exports = SocketAdmin;
|
||||
|
||||
Reference in New Issue
Block a user