From 206978e1cca7f379313abb3e36c5c76dafbc50c4 Mon Sep 17 00:00:00 2001 From: jrtechs Date: Wed, 23 Jan 2019 20:54:51 -0500 Subject: [PATCH] HOT fix for the sql statement on the admin page -- refactor broke it. --- admin/adminHome.js | 2 +- sites/admin.js | 2 +- utils/sql.js | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/admin/adminHome.js b/admin/adminHome.js index 2bc4e4c..c1dbdd0 100644 --- a/admin/adminHome.js +++ b/admin/adminHome.js @@ -75,7 +75,7 @@ const processPost = function(postData) 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 + "', '" + post.add_post_date + "', '" + post.add_post_name + "', '" + urls + "')"; diff --git a/sites/admin.js b/sites/admin.js index 4b7731c..bbfa674 100644 --- a/sites/admin.js +++ b/sites/admin.js @@ -1,12 +1,12 @@ //sending static content const includes = require('../includes/includes.js'); - //used to append static content to result const contentLoader = require('../includes/staticContentServer.js'); const whiskers = require('whiskers'); + /** * @author Jeffery Russell 11-3-18 * diff --git a/utils/sql.js b/utils/sql.js index 2609e9d..710af3b 100644 --- a/utils/sql.js +++ b/utils/sql.js @@ -171,6 +171,11 @@ module.exports= }); }, + insert: function(sqlStatement) + { + return insert(sqlStatement); + }, + /** * Not to be mistaken for getPostData() in @file utils/utils.js,