Add next page endpoint to kinds

This commit is contained in:
Sam Carlton 2022-05-20 14:40:08 -05:00
parent 2a02441734
commit 7ebee653c6

View file

@ -56,9 +56,17 @@ export class KindList extends PaginatedList {
get apiFiles () {
return this.pages.map( kindPage => {
// If we have a number, we need to add it to the file path
const nextPage = kindPage.hasNextPage ? makeKindEndpoint({
kindSlug: this.kindSlug,
number: kindPage.number+ 1
}) : ''
return {
path: makeKindFilePath({ kindSlug: this.kindSlug, number: kindPage.number }),
content: {
nextPage,
items: kindPage.items
}
}