feat: #8450, next/prev link tags on /unread /recent

This commit is contained in:
Barış Soner Uşaklı
2020-06-30 11:34:32 -04:00
parent e80100b5b0
commit eb9704f85e
5 changed files with 19 additions and 2 deletions

View File

@@ -69,14 +69,14 @@ pagination.create = function (currentPage, pageCount, queryObj) {
if (currentPage < pageCount) {
data.rel.push({
rel: 'next',
href: '?page=' + next,
href: '?' + qs.stringify({ ...queryObj, page: next }),
});
}
if (currentPage > 1) {
data.rel.push({
rel: 'prev',
href: '?page=' + previous,
href: '?' + qs.stringify({ ...queryObj, page: previous }),
});
}
return data;