mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +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);
|
||||
},
|
||||
function(categoryData, next) {
|
||||
async.map(categoryData, function(category, next) {
|
||||
var route = 'category/' + category.slug;
|
||||
|
||||
next(null, {
|
||||
route: route,
|
||||
categoryData = categoryData.map(function(category) {
|
||||
return {
|
||||
route: 'category/' + category.slug,
|
||||
name: 'Category: ' + category.name
|
||||
});
|
||||
}, next);
|
||||
};
|
||||
});
|
||||
next(null, categoryData);
|
||||
}
|
||||
], function(err, categoryData) {
|
||||
if (err || !categoryData) categoryData = [];
|
||||
|
||||
Reference in New Issue
Block a user