|
|
|
@ -148,14 +148,14 @@ function generateForTopic(req, res, callback) {
|
|
|
|
|
], callback);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function generateForCategory(req, res, next) {
|
|
|
|
|
function generateForCategory(req, res, callback) {
|
|
|
|
|
if (meta.config['feeds:disableRSS']) {
|
|
|
|
|
return controllers404.send404(req, res);
|
|
|
|
|
}
|
|
|
|
|
var cid = req.params.category_id;
|
|
|
|
|
var category;
|
|
|
|
|
if (!parseInt(cid, 10)) {
|
|
|
|
|
return next();
|
|
|
|
|
return setImmediate(callback);
|
|
|
|
|
}
|
|
|
|
|
async.waterfall([
|
|
|
|
|
function (next) {
|
|
|
|
@ -177,6 +177,9 @@ function generateForCategory(req, res, next) {
|
|
|
|
|
},
|
|
|
|
|
function (results, next) {
|
|
|
|
|
category = results.category;
|
|
|
|
|
if (!category) {
|
|
|
|
|
return callback();
|
|
|
|
|
}
|
|
|
|
|
validateTokenIfRequiresLogin(!results.privileges.read, cid, req, res, next);
|
|
|
|
|
},
|
|
|
|
|
function (next) {
|
|
|
|
@ -191,7 +194,7 @@ function generateForCategory(req, res, next) {
|
|
|
|
|
function (feed) {
|
|
|
|
|
sendFeed(feed, res);
|
|
|
|
|
},
|
|
|
|
|
], next);
|
|
|
|
|
], callback);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function generateForTopics(req, res, next) {
|
|
|
|
|