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