mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 02:36:16 +01:00
feat: #8450, next/prev link tags on /unread /recent
This commit is contained in:
@@ -42,6 +42,7 @@ unreadController.get = async function (req, res, next) {
|
||||
data.title = meta.config.homePageTitle || '[[pages:home]]';
|
||||
data.pageCount = Math.max(1, Math.ceil(data.topicCount / userSettings.topicsPerPage));
|
||||
data.pagination = pagination.create(page, data.pageCount, req.query);
|
||||
helpers.addLinkTags({ url: 'unread', res: req.res, tags: data.pagination.rel });
|
||||
|
||||
if (userSettings.usePagination && (page < 1 || page > data.pageCount)) {
|
||||
req.query.page = Math.max(1, Math.min(data.pageCount, page));
|
||||
|
||||
Reference in New Issue
Block a user