diff --git a/README.md b/README.md index 1ca66b0..2ca504d 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,9 @@ npm install memory-cache --save npm install request npm install nodemailer npm install nodemailer-smtp-transport + + +npm install node-pandoc ``` diff --git a/admin.js b/admin.js index 574263a..ff986e5 100644 --- a/admin.js +++ b/admin.js @@ -67,7 +67,7 @@ app.use(function(request, result) const file = "./admin/admin.js"; Promise.all([includes.printAdminHeader(), - require(file).main(filename, request), + require(file).main(request), includes.printFooter()]).then(function(content) { result.write(content.join('')); diff --git a/admin/admin.js b/admin/admin.js index 57fe199..967086a 100644 --- a/admin/admin.js +++ b/admin/admin.js @@ -22,6 +22,7 @@ module.exports= { utils.getPostData(request).then(function (postData) { + console.log(postData); Promise.all([require("./posts/newPost.js").main(postData), require("./category/addCategory.js").main(postData), require("./posts/editPost.js").main(postData), diff --git a/admin/category/addCategory.js b/admin/category/addCategory.js index 3dfbfc5..d05fac9 100644 --- a/admin/category/addCategory.js +++ b/admin/category/addCategory.js @@ -81,7 +81,7 @@ module.exports= { return new Promise(function(resolve, reject) { - Promise.all([utils.include("./admin/addCategory.html"), + Promise.all([utils.include("./admin/category/addCategory.html"), printCategories(), processPost(postData)]).then(function(html) { diff --git a/admin/downloads/manageDownloads.js b/admin/downloads/manageDownloads.js index be0e02b..84ef742 100644 --- a/admin/downloads/manageDownloads.js +++ b/admin/downloads/manageDownloads.js @@ -57,7 +57,7 @@ const addDownload = function(postData) return new Promise(function(resolve, reject) { Promise.all([addDownloadPostData(postData), - utils.include("./admin/addDownload.html")]).then(function(html) + utils.include("./admin/downloads/addDownload.html")]).then(function(html) { resolve("
"); - - for(var i = 0; i < 3; i++) - { - html+= "
" + htmlPost[i];
- }
-
- html = html.split("").join("");
-
- html += "
");
- html += "