started moving admin mdw into middleware/admin.js; res.render post-processing to append admin footer/header

This commit is contained in:
psychobunny
2014-03-03 13:17:10 -05:00
parent e588762aa0
commit eed97648b1
3 changed files with 62 additions and 4 deletions

View File

@@ -103,10 +103,8 @@ module.exports = function(app, middleware, controllers) {
}());
app.namespace('/admin', function () {
app.get('/', function (req, res) {
Admin.buildHeader(req, res, function(err, header) {
res.send(header + app.create_route('admin/index') + templates['admin/footer']);
});
app.get('/', middleware.buildHeader, function(req, res, next) {
res.render('admin/index', {});
});
app.get('/index', function (req, res) {