mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: suggested topic tid
This commit is contained in:
@@ -11,7 +11,10 @@ const plugins = require('../plugins');
|
|||||||
module.exports = function (Topics) {
|
module.exports = function (Topics) {
|
||||||
Topics.getSuggestedTopics = async function (tid, uid, start, stop, cutoff = 0) {
|
Topics.getSuggestedTopics = async function (tid, uid, start, stop, cutoff = 0) {
|
||||||
let tids;
|
let tids;
|
||||||
tid = parseInt(tid, 10);
|
if (!tid) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
tid = String(tid);
|
||||||
cutoff = cutoff === 0 ? cutoff : (cutoff * 2592000000);
|
cutoff = cutoff === 0 ? cutoff : (cutoff * 2592000000);
|
||||||
const { cid, title, tags } = await Topics.getTopicFields(tid, [
|
const { cid, title, tags } = await Topics.getTopicFields(tid, [
|
||||||
'cid', 'title', 'tags',
|
'cid', 'title', 'tags',
|
||||||
|
|||||||
Reference in New Issue
Block a user