added missing next callbacks

v1.18.x
Baris Soner Usakli 11 years ago
parent 654f53f142
commit 49254f268e

@ -91,11 +91,12 @@
}; };
Feed.forRecent = function(callback) { Feed.forRecent = function(callback) {
topics.getLatestTopics(0, 0, 19, undefined, function (err, recentData) { topics.getLatestTopics(0, 0, 19, undefined, function (err, recentData) {
if(err){ if(err){
return callback(err); return callback(err);
} }
console.log(recentData);
var feed = new rss({ var feed = new rss({
title: 'Recently Active Topics', title: 'Recently Active Topics',
description: 'A list of topics that have been active within the past 24 hours', description: 'A list of topics that have been active within the past 24 hours',
@ -141,7 +142,7 @@
feed.pubDate = new Date(parseInt(popularData.topics[0].lastposttime, 10)).toUTCString(); feed.pubDate = new Date(parseInt(popularData.topics[0].lastposttime, 10)).toUTCString();
} }
popularData.topics.forEach(function(topicData, next) { popularData.topics.forEach(function(topicData) {
feed.item({ feed.item({
title: topicData.title, title: topicData.title,
url: nconf.get('url') + '/topic/' + topicData.slug, url: nconf.get('url') + '/topic/' + topicData.slug,

@ -482,7 +482,7 @@ module.exports.server = server;
}); });
}); });
app.get('/recent.rss', function(req, res) { app.get('/recent.rss', function(req, res, next) {
feed.forRecent(function(err, feedData){ feed.forRecent(function(err, feedData){
if(err) { if(err) {
return next(err); return next(err);
@ -492,7 +492,7 @@ module.exports.server = server;
}); });
}); });
app.get('/popular.rss', function(req, res) { app.get('/popular.rss', function(req, res, next) {
feed.forPopular(function(err, feedData){ feed.forPopular(function(err, feedData){
if(err) { if(err) {
return next(err); return next(err);

Loading…
Cancel
Save