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:
Barış Soner Uşaklı
2018-11-25 19:08:38 -05:00
committed by GitHub
parent 96a2be9b55
commit 53ad2bbd6e
11 changed files with 133 additions and 98 deletions

View File

@@ -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);