mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
closed #296
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
if (process.env.NODE_ENV === 'development') winston.info('[rss] Updating RSS feeds for topic ' + tid);
|
||||
|
||||
topics.getTopicWithPosts(tid, 0, 0, -1, function(err, topicData) {
|
||||
if (err) return winston.error('Problem saving topic RSS feed', err.stack);
|
||||
if (err) return callback(new Error('topic-invalid'));
|
||||
|
||||
var feed = new rss({
|
||||
title: topicData.topic_name,
|
||||
@@ -71,7 +71,7 @@
|
||||
Feed.updateCategory = function(cid, callback) {
|
||||
if (process.env.NODE_ENV === 'development') winston.info('[rss] Updating RSS feeds for category ' + cid);
|
||||
categories.getCategoryById(cid, 0, function(err, categoryData) {
|
||||
if (err) return winston.error('Could not update RSS feed for category ' + cid, err.stack);
|
||||
if (err) return callback(new Error('category-invalid'));
|
||||
|
||||
var feed = new rss({
|
||||
title: categoryData.category_name,
|
||||
|
||||
@@ -244,8 +244,9 @@ var express = require('express'),
|
||||
};
|
||||
|
||||
if (!fs.existsSync(rssPath)) {
|
||||
feed.updateTopic(tid, function() {
|
||||
loadFeed();
|
||||
feed.updateTopic(tid, function(err) {
|
||||
if (err) res.redirect('/404');
|
||||
else loadFeed();
|
||||
});
|
||||
} else loadFeed();
|
||||
|
||||
@@ -320,8 +321,9 @@ var express = require('express'),
|
||||
};
|
||||
|
||||
if (!fs.existsSync(rssPath)) {
|
||||
feed.updateCategory(cid, function() {
|
||||
loadFeed();
|
||||
feed.updateCategory(cid, function(err) {
|
||||
if (err) res.redirect('/404');
|
||||
else loadFeed();
|
||||
});
|
||||
} else loadFeed();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user