mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-03 22:30:58 +01:00
seems the categories.search socket method is not used...
This commit is contained in:
@@ -50,32 +50,6 @@ Categories.update = function(socket, data, callback) {
|
||||
categories.update(data, callback);
|
||||
};
|
||||
|
||||
Categories.search = function(socket, data, callback) {
|
||||
if(!data) {
|
||||
return callback(new Error('[[error:invalid-data]]'));
|
||||
}
|
||||
|
||||
var username = data.username,
|
||||
cid = data.cid;
|
||||
|
||||
user.search({query: username, uid: socket.uid}, function(err, data) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
async.map(data.users, function(userObj, next) {
|
||||
privileges.categories.userPrivileges(cid, userObj.uid, function(err, privileges) {
|
||||
if(err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
userObj.privileges = privileges;
|
||||
next(null, userObj);
|
||||
});
|
||||
}, callback);
|
||||
});
|
||||
};
|
||||
|
||||
Categories.setPrivilege = function(socket, data, callback) {
|
||||
if(!data) {
|
||||
return callback(new Error('[[error:invalid-data]]'));
|
||||
|
||||
Reference in New Issue
Block a user