mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-03 13:19:51 +01:00
23 lines
463 B
JavaScript
23 lines
463 B
JavaScript
'use strict';
|
|
|
|
var navigationController = {};
|
|
|
|
navigationController.get = function(req, res, next) {
|
|
require('../../navigation/admin').getAdmin(function(err, data) {
|
|
if (err) {
|
|
return next(err);
|
|
}
|
|
|
|
|
|
data.enabled.forEach(function(enabled, index) {
|
|
enabled.index = index;
|
|
enabled.selected = index === 0;
|
|
});
|
|
|
|
data.navigation = data.enabled.slice();
|
|
|
|
res.render('admin/general/navigation', data);
|
|
});
|
|
};
|
|
|
|
module.exports = navigationController; |