Browse Source

HOT fix for the sql statement on the admin page -- refactor broke it.

pull/60/head
jrtechs 5 years ago
parent
commit
206978e1cc
3 changed files with 7 additions and 2 deletions
  1. +1
    -1
      admin/adminHome.js
  2. +1
    -1
      sites/admin.js
  3. +5
    -0
      utils/sql.js

+ 1
- 1
admin/adminHome.js View File

@ -75,7 +75,7 @@ const processPost = function(postData)
urls =urls.toLowerCase(); urls =urls.toLowerCase();
var q = "insert into blog (category_id, picture_url, published, name, url) values ";
var q = "insert into posts (category_id, picture_url, published, name, url) values ";
q += "('" + post.add_post_category + "', '" + post.add_post_picture + q += "('" + post.add_post_category + "', '" + post.add_post_picture +
"', '" + post.add_post_date + "', '" + post.add_post_name + "', '" + urls + "')"; "', '" + post.add_post_date + "', '" + post.add_post_name + "', '" + urls + "')";

+ 1
- 1
sites/admin.js View File

@ -1,12 +1,12 @@
//sending static content //sending static content
const includes = require('../includes/includes.js'); const includes = require('../includes/includes.js');
//used to append static content to result //used to append static content to result
const contentLoader = require('../includes/staticContentServer.js'); const contentLoader = require('../includes/staticContentServer.js');
const whiskers = require('whiskers'); const whiskers = require('whiskers');
/** /**
* @author Jeffery Russell 11-3-18 * @author Jeffery Russell 11-3-18
* *

+ 5
- 0
utils/sql.js View File

@ -171,6 +171,11 @@ module.exports=
}); });
}, },
insert: function(sqlStatement)
{
return insert(sqlStatement);
},
/** /**
* Not to be mistaken for getPostData() in @file utils/utils.js, * Not to be mistaken for getPostData() in @file utils/utils.js,

Loading…
Cancel
Save