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.
 
 

37 lines
773 B

//file io
const utils = require('../../utils/utils.js');
//update db
const sql = require('../../utils/sql');
//parse post data
const qs = require('querystring');
module.exports=
{
main: function(postData)
{
return new Promise(function(resolve, reject)
{
Promise.all([utils.include("./admin/category/addCategory.html"),
printCategories(),
processPost(postData)]).then(function(html)
{
resolve("<div class=\"col-md-6\">" +
html.join('') +
"</div></div>");
}).catch(function(error)
{
console.log("error in addCategory.js");
reject(error);
})
});
}
};