mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: #7359
This commit is contained in:
@@ -15,7 +15,20 @@ categoriesController.get = function (req, res, callback) {
|
||||
async.parallel({
|
||||
category: async.apply(categories.getCategories, [req.params.category_id], req.uid),
|
||||
parent: async.apply(categories.getParents, [req.params.category_id]),
|
||||
allCategories: async.apply(categories.buildForSelect, req.uid, 'read'),
|
||||
allCategories: function (next) {
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
categories.getAllCidsFromSet('categories:cid', next);
|
||||
},
|
||||
function (cids, next) {
|
||||
categories.getCategories(cids, req.uid, next);
|
||||
},
|
||||
function (categoryData, next) {
|
||||
categoryData = categories.getTree(categoryData);
|
||||
categories.buildForSelectCategories(categoryData, next);
|
||||
},
|
||||
], next);
|
||||
},
|
||||
}, next);
|
||||
},
|
||||
function (data, next) {
|
||||
|
||||
Reference in New Issue
Block a user