add tid/uid to teaser

This commit is contained in:
Barış Soner Uşaklı
2024-04-12 11:44:00 -04:00
parent 18990795ec
commit 7218a9d8cb
2 changed files with 4 additions and 2 deletions

View File

@@ -116,9 +116,10 @@ module.exports = function (Categories) {
if (teaser) {
teaser.cid = topicData[index].cid;
teaser.parentCids = cidToRoot[teaser.cid];
teaser.tid = undefined;
teaser.uid = undefined;
teaser.tid = topicData[index].tid;
teaser.uid = topicData[index].uid;
teaser.topic = {
tid: topicData[index].tid,
slug: topicData[index].slug,
title: topicData[index].title,
};

View File

@@ -396,6 +396,7 @@ helpers.setCategoryTeaser = function (category) {
url: `${nconf.get('relative_path')}/post/${post.pid}`,
timestampISO: post.timestampISO,
pid: post.pid,
tid: post.tid,
index: post.index,
topic: post.topic,
user: post.user,