Skip to content

Node.js based forum software built for the modern web

seems the categories.search socket method is not used...

Julian Lam1229470bbaaf
diff --git a/src/socket.io/admin/categories.js b/src/socket.io/admin/categories.js
index a63f203dc7..2fb7af1f7d 100644
--- a/src/socket.io/admin/categories.js
+++ b/src/socket.io/admin/categories.js
@@ -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]]'));