mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add next page endpoint to kinds
This commit is contained in:
parent
2a02441734
commit
7ebee653c6
1 changed files with 8 additions and 0 deletions
|
|
@ -56,9 +56,17 @@ export class KindList extends PaginatedList {
|
||||||
|
|
||||||
get apiFiles () {
|
get apiFiles () {
|
||||||
return this.pages.map( kindPage => {
|
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 {
|
return {
|
||||||
path: makeKindFilePath({ kindSlug: this.kindSlug, number: kindPage.number }),
|
path: makeKindFilePath({ kindSlug: this.kindSlug, number: kindPage.number }),
|
||||||
content: {
|
content: {
|
||||||
|
nextPage,
|
||||||
items: kindPage.items
|
items: kindPage.items
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue