parallel not needed

v1.18.x
yariplus 10 years ago
parent beb2b38cb7
commit 0c1c42d362

@ -348,8 +348,6 @@ adminController.navigation.get = function(req, res, next) {
};
adminController.homepage.get = function(req, res, next) {
async.parallel({
categoryData: function(next) {
async.waterfall([
function(next) {
db.getSortedSetRange('cid:0:children', 0, -1, next);
@ -370,10 +368,8 @@ adminController.homepage.get = function(req, res, next) {
});
}, next);
}
], next);
}
}, function(err, results) {
if (err || !results || !results.categoryData) results = {categoryData:[]};
], function(err, categoryData) {
if (err || !categoryData) categoryData = [];
plugins.fireHook('filter:homepage.get', {routes: [
{
@ -388,7 +384,7 @@ adminController.homepage.get = function(req, res, next) {
route: 'popular',
name: 'Popular'
}
].concat(results.categoryData)}, function(err, data) {
].concat(categoryData)}, function(err, data) {
data.routes.push({
route: '',
name: 'Custom'

Loading…
Cancel
Save