|
|
|
@ -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'
|
|
|
|
|