mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-05 05:25:49 +01:00
fix: crash in topic controller
This commit is contained in:
committed by
psychobunny
parent
fe03effe7d
commit
0c7c70edaf
@@ -89,17 +89,18 @@ topicsController.get = async function getTopic(req, res, callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
topicData.postIndex = postIndex;
|
topicData.postIndex = postIndex;
|
||||||
topicData.pagination = pagination.create(currentPage, pageCount, req.query);
|
|
||||||
topicData.pagination.rel.forEach(function (rel) {
|
|
||||||
rel.href = nconf.get('url') + '/topic/' + topicData.slug + rel.href;
|
|
||||||
res.locals.linkTags.push(rel);
|
|
||||||
});
|
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
buildBreadcrumbs(hookData.topicData),
|
buildBreadcrumbs(hookData.topicData),
|
||||||
addTags(topicData, req, res),
|
addTags(topicData, req, res),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
topicData.pagination = pagination.create(currentPage, pageCount, req.query);
|
||||||
|
topicData.pagination.rel.forEach(function (rel) {
|
||||||
|
rel.href = nconf.get('url') + '/topic/' + topicData.slug + rel.href;
|
||||||
|
res.locals.linkTags.push(rel);
|
||||||
|
});
|
||||||
|
|
||||||
incrementViewCount(req, tid);
|
incrementViewCount(req, tid);
|
||||||
|
|
||||||
markAsRead(req, tid);
|
markAsRead(req, tid);
|
||||||
|
|||||||
Reference in New Issue
Block a user