mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
Categories optimize (#6999)
* WIP * fix category page * fix counts, and copyPrivileges * fix lint * more fixes, * redis fix * fix test * fix category test * remove getParentsAndChildren
This commit is contained in:
committed by
GitHub
parent
96a2be9b55
commit
53ad2bbd6e
@@ -139,12 +139,13 @@ SocketCategories.getMoveCategories = function (socket, data, callback) {
|
||||
categories: function (next) {
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
db.getSortedSetRange('cid:0:children', 0, -1, next);
|
||||
db.getSortedSetRange('categories:cid', 0, -1, next);
|
||||
},
|
||||
function (cids, next) {
|
||||
categories.getCategories(cids, socket.uid, next);
|
||||
},
|
||||
function (categoriesData, next) {
|
||||
categoriesData = categories.getTree(categoriesData);
|
||||
categories.buildForSelectCategories(categoriesData, next);
|
||||
},
|
||||
], next);
|
||||
|
||||
Reference in New Issue
Block a user