recursively get all children
calculate topic/post count from children
new sorted set `cid:<id>:children`
fix search query params
This commit is contained in:
barisusakli
2015-08-18 14:17:16 -04:00
parent a990e9c3bf
commit 5b87af4389
12 changed files with 181 additions and 43 deletions

View File

@@ -15,7 +15,7 @@ SocketCategories.getRecentReplies = function(socket, cid, callback) {
};
SocketCategories.get = function(socket, data, callback) {
categories.getCategoriesByPrivilege(socket.uid, 'find', callback);
categories.getCategoriesByPrivilege('categories:cid', socket.uid, 'find', callback);
};
SocketCategories.getWatchedCategories = function(socket, data, callback) {
@@ -117,7 +117,7 @@ SocketCategories.getUsersInCategory = function(socket, cid, callback) {
};
SocketCategories.getCategoriesByPrivilege = function(socket, privilege, callback) {
categories.getCategoriesByPrivilege(socket.uid, privilege, callback);
categories.getCategoriesByPrivilege('categories:cid', socket.uid, privilege, callback);
};
SocketCategories.watch = function(socket, cid, callback) {