mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
fix unneeded async
This commit is contained in:
@@ -359,14 +359,13 @@ adminController.homepage.get = function(req, res, next) {
|
|||||||
categories.getMultipleCategoryFields(cids, ['name', 'slug'], next);
|
categories.getMultipleCategoryFields(cids, ['name', 'slug'], next);
|
||||||
},
|
},
|
||||||
function(categoryData, next) {
|
function(categoryData, next) {
|
||||||
async.map(categoryData, function(category, next) {
|
categoryData = categoryData.map(function(category) {
|
||||||
var route = 'category/' + category.slug;
|
return {
|
||||||
|
route: 'category/' + category.slug,
|
||||||
next(null, {
|
|
||||||
route: route,
|
|
||||||
name: 'Category: ' + category.name
|
name: 'Category: ' + category.name
|
||||||
});
|
};
|
||||||
}, next);
|
});
|
||||||
|
next(null, categoryData);
|
||||||
}
|
}
|
||||||
], function(err, categoryData) {
|
], function(err, categoryData) {
|
||||||
if (err || !categoryData) categoryData = [];
|
if (err || !categoryData) categoryData = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user