Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
918 B

  1. const utils = require('../utils/utils.js');
  2. var Promise = require('promise');
  3. module.exports=
  4. {
  5. /**
  6. * Method calls the admin widgets it correct order
  7. *
  8. * @param result
  9. * @param fileName
  10. * @param request
  11. * @return {*|Promise}
  12. */
  13. main: function(result, fileName, request)
  14. {
  15. return new Promise(function(resolve, reject)
  16. {
  17. result.write("<div class=\"w3-row\">");
  18. utils.getPostData(request).then(function (postData)
  19. {
  20. return require("../admin/newPost.js").main(result, postData);
  21. }).then(function(postData)
  22. {
  23. return require("../admin/addCategory.js").main(result, postData);
  24. }).then(function()
  25. {
  26. console.log("admin page ended");
  27. resolve();
  28. })
  29. result.write("</div>");
  30. });
  31. }
  32. };