Skip to content

Commit 4035a99

Browse files
author
Joel Taylor
committed
Merge pull request #273 from codeschool/remove_fivejs_from_rss
Only include flow stories in RSS feed
2 parents 403e47e + 96bbc58 commit 4035a99

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

server/routes/feed.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ router.get('/rss', function(req, res, next) {
1414
};
1515
Articles.rss(function(news) {
1616
news.map(function(story){
17-
if (story.new){
18-
story.link = story.url
19-
}else{
20-
story.link = "https://javascript.com/news/" + story.slug
21-
}
17+
story.link = "https://javascript.com/news/" + story.slug
2218
});
2319
res.set('Content-Type', 'text/xml');
2420
res.render('feed/rss', { options: options, news: news });

server/services/articles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var Articles = {
4141

4242
// Returns all stories that have been approved for RSS feed. Limit: 25
4343
rss(cb){
44-
db.query('SELECT a.news, a.url, a.title, a.slug, a.body, a,published_at FROM articles as a WHERE a.approved = true ORDER BY published_at DESC', [], cb)
44+
db.query('SELECT a.news, a.title, a.slug, a.body, a,published_at FROM articles as a WHERE a.approved = true AND a.news = false ORDER BY published_at DESC', [], cb)
4545
},
4646

4747
// Returns article based on slug

0 commit comments

Comments
 (0)