|
|
|
@ -89,17 +89,18 @@ topicsController.get = async function getTopic(req, res, callback) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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([
|
|
|
|
|
buildBreadcrumbs(hookData.topicData),
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
markAsRead(req, tid);
|
|
|
|
|