mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
23 lines
504 B
JavaScript
23 lines
504 B
JavaScript
'use strict';
|
|
|
|
var async = require('async');
|
|
|
|
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);
|
|
};
|