mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +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) {
|
SocketAdmin.categories.update = function(socket, data) {
|
||||||
if(!data) {
|
if(!data) {
|
||||||
return callback(new Error('invalid data'));
|
throw new Error('invalid data');
|
||||||
}
|
}
|
||||||
|
|
||||||
admin.categories.update(data, socket);
|
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