Browse Source

RSS feed fix.

pull/92/head
jrtechs 4 years ago
parent
commit
3a458b6297
2 changed files with 4 additions and 3 deletions
  1. +1
    -1
      routes/rss.js
  2. +3
    -2
      utils/sql.js

+ 1
- 1
routes/rss.js View File

@ -26,7 +26,7 @@ const generateRSSfeed = function()
return new Promise((resolve, reject)=>
{
sql.getRecentPosts(limit=200).then((data)=>
sql.getRecentPosts(200).then((data)=>
{
for(var i = 0; i < data.length; i++)
{

+ 3
- 2
utils/sql.js View File

@ -279,12 +279,13 @@ module.exports=
*
* @return {*|Promise}
*/
getRecentPosts: function()
getRecentPosts: function(limit)
{
limit = (limit == null) ? 10 : limit;
return new Promise(function(resolve, reject)
{
var q = "select name,url, published, category_id from posts order " +
"by post_id desc limit 10";
"by post_id desc limit " + limit;
fetch(q).then(function(sqlPosts)
{
fetchWithCategoryInformation(sqlPosts).then(function(data)

Loading…
Cancel
Save