clean up in routes/admin.js

v1.18.x
psychobunny 11 years ago
parent fe147bfb67
commit da331a1e6b

@ -50,23 +50,6 @@ module.exports = function(app, middleware, controllers) {
app.all('/admin/*', middleware.admin.isAdmin); app.all('/admin/*', middleware.admin.isAdmin);
app.get('/admin', middleware.admin.isAdmin); app.get('/admin', middleware.admin.isAdmin);
(function () {
var routes = [
'categories/active', 'categories/disabled', 'users', 'topics', 'settings', 'themes',
'database', 'events', 'motd', 'groups', 'plugins', 'languages', 'logger',
'users/latest', 'users/sort-posts', 'users/sort-reputation', 'users/search'
];
for (var i = 0, ii = routes.length; i < ii; i++) {
(function (route) {
/*app.get('/admin/' + route, function (req, res) {
Admin.buildHeader(req, res, function(err, header) {
res.send(header + app.create_route('admin/' + route) + templates['admin/footer']);
});
});*/
}(routes[i]));
}
}());
app.get('/admin/', middleware.admin.buildHeader, controllers.admin.home); app.get('/admin/', middleware.admin.buildHeader, controllers.admin.home);

Loading…
Cancel
Save