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.

29 lines
674 B

  1. const utils = require('../../utils/utils.js');
  2. const sql = require('../../utils/sql');
  3. const qs = require('querystring');
  4. module.exports=
  5. {
  6. /**
  7. *
  8. * @param postData
  9. * @return {*}
  10. */
  11. main: function(postData)
  12. {
  13. return new Promise(function(resolve, reject)
  14. {
  15. Promise.all([utils.include("./admin/posts/newPost.html"), processPost(postData)]).then(function(html)
  16. {
  17. resolve(html.join(''));
  18. }).catch(function(error)
  19. {
  20. reject(error);
  21. })
  22. });
  23. }
  24. };