diff --git a/sites/admin.js b/sites/admin.js index 5d1f777..df5802a 100644 --- a/sites/admin.js +++ b/sites/admin.js @@ -1,9 +1,6 @@ //sending static content const includes = require('../includes/includes.js'); -//used for file IO -const utils = require('../utils/utils.js'); - //used to append static content to result const contentLoader = require('../includes/staticContentServer.js'); @@ -40,11 +37,11 @@ module.exports= const file = "../admin/admin.js"; var templateContext = Object(); - Promise.all([includes.fetchTemplate("admin/adminMain.html")], + Promise.all([includes.fetchTemplate("admin/adminMain.html"), includes.printAdminHeader(templateContext), require(file).main(request, clientAddress, templateContext, filename), - includes.printFooter(templateContext) - ).then(function(content) + includes.printFooter(templateContext), + ]).then(function(content) { result.write(whiskers.render(content[0], templateContext)); result.end(); diff --git a/templates/admin/adminHome.html b/templates/admin/adminHome.html index 2c419dd..0f7f6d4 100644 --- a/templates/admin/adminHome.html +++ b/templates/admin/adminHome.html @@ -94,7 +94,7 @@