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.

23 lines
675 B

  1. module.exports=
  2. {
  3. main: function(postData)
  4. {
  5. return new Promise(function(resolve, reject)
  6. {
  7. Promise.all([utils.include("./admin/addCategory.html"),
  8. printCategories(),
  9. processPost(postData)]).then(function(html)
  10. {
  11. resolve("<div class=\"col-md-6\">" +
  12. html.join('') +
  13. "</div></div>");
  14. }).catch(function(error)
  15. {
  16. console.log("error in addCategory.js");
  17. reject(error);
  18. })
  19. });
  20. }
  21. };