From 48bdab25896e3491bb61356618e4b4ce5d7624a1 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Fri, 21 Jan 2022 20:56:46 +0400 Subject: [PATCH] Removed getPostsForRSS and getPosts now returns all posts. --- homepage/mindflow.js | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/homepage/mindflow.js b/homepage/mindflow.js index 796f728..ada1716 100644 --- a/homepage/mindflow.js +++ b/homepage/mindflow.js @@ -11,29 +11,11 @@ connection.config.queryFormat = util.mysqlQueryFormat; exports.closeConnection = () => connection.end(); -exports.getPosts = category => { +exports.getPosts = () => { return new Promise((resolve, reject) => { let query = ` SELECT blog.entry_id AS post_id, - blog.date, - blog.title, - blog.body - FROM blog - LEFT JOIN blog_categories ON blog_categories.category_id = blog.category - WHERE blog_categories.category = :category - ORDER BY blog.date DESC;`; - - connection.query(query, { category: category }, (err, results) => { - if (err) reject(err); - resolve(results); }); - }); -}; - -exports.getPostsForRSS = () => { - return new Promise((resolve, reject) => { - let query = ` - SELECT blog.date, blog_categories.category, blog.title,