You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
504 B
JavaScript

10 years ago
'use strict';
var async = require('async');
10 years ago
var navigationAdmin = require('../../navigation/admin');
var navigationController = module.exports;
navigationController.get = function (req, res, next) {
async.waterfall([
navigationAdmin.getAdmin,
function (data) {
data.enabled.forEach(function (enabled, index) {
enabled.index = index;
enabled.selected = index === 0;
});
data.navigation = data.enabled.slice();
res.render('admin/general/navigation', data);
},
], next);
10 years ago
};