mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-03 19:11:22 +01:00
fix: add missing timestamp
allow add tag to query param to recent/top/popular feeds
This commit is contained in:
@@ -175,7 +175,7 @@ async function generateForTopics(req, res, next) {
|
|||||||
description: 'A list of topics that have been created recently',
|
description: 'A list of topics that have been created recently',
|
||||||
feed_url: '/topics.rss',
|
feed_url: '/topics.rss',
|
||||||
useMainPost: true,
|
useMainPost: true,
|
||||||
}, 'topics:tid', res);
|
}, 'topics:tid', res, 'timestamp');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function generateForRecent(req, res, next) {
|
async function generateForRecent(req, res, next) {
|
||||||
@@ -228,14 +228,15 @@ async function generateSorted(options, req, res, next) {
|
|||||||
stop: 19,
|
stop: 19,
|
||||||
term: term,
|
term: term,
|
||||||
sort: options.sort,
|
sort: options.sort,
|
||||||
|
tags: req.query.tag,
|
||||||
};
|
};
|
||||||
|
|
||||||
const { cid } = req.query;
|
let { cid } = req.query;
|
||||||
if (cid) {
|
if (cid) {
|
||||||
if (!await privileges.categories.can('topics:read', cid, uid)) {
|
if (!Array.isArray(cid)) {
|
||||||
return controllerHelpers.notAllowed(req, res);
|
cid = [cid];
|
||||||
}
|
}
|
||||||
params.cids = [cid];
|
params.cids = await privileges.categories.filterCids('topics:read', cid, uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await topics.getSortedTopics(params);
|
const result = await topics.getSortedTopics(params);
|
||||||
@@ -399,7 +400,7 @@ async function generateForUserTopics(req, res, next) {
|
|||||||
description: `A list of topics that are posted by ${userData.username}`,
|
description: `A list of topics that are posted by ${userData.username}`,
|
||||||
feed_url: `/user/${userslug}/topics.rss`,
|
feed_url: `/user/${userslug}/topics.rss`,
|
||||||
site_url: `/user/${userslug}/topics`,
|
site_url: `/user/${userslug}/topics`,
|
||||||
}, `uid:${userData.uid}:topics`, res);
|
}, `uid:${userData.uid}:topics`, res, 'timestamp');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function generateForTag(req, res) {
|
async function generateForTag(req, res) {
|
||||||
@@ -421,7 +422,7 @@ async function generateForTag(req, res) {
|
|||||||
site_url: `/tags/${tag}`,
|
site_url: `/tags/${tag}`,
|
||||||
start: start,
|
start: start,
|
||||||
stop: stop,
|
stop: stop,
|
||||||
}, set, res);
|
}, set, res, 'timestamp');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getUidFromToken(req) {
|
async function getUidFromToken(req) {
|
||||||
|
|||||||
Reference in New Issue
Block a user