make cursor load from a returned "Next"
This commit is contained in:
parent
e0a2224544
commit
be90a09ce4
2 changed files with 6 additions and 2 deletions
|
@ -14,7 +14,7 @@ export async function loadPostsForAuthor(
|
|||
const url = new URL(`authors/${authorId}/posts`, ApiHost)
|
||||
if (amount != null) url.searchParams.set('amount', amount.toString())
|
||||
|
||||
if (cursor != null) url.searchParams.set('cursor', cursor)
|
||||
if (cursor != null) url.searchParams.set('from', cursor)
|
||||
|
||||
const res = await doGetRequest(url)
|
||||
|
||||
|
@ -28,7 +28,7 @@ export async function loadPublicFeed(
|
|||
const url = new URL(`posts`, ApiHost)
|
||||
if (amount != null) url.searchParams.set('amount', amount.toString())
|
||||
|
||||
if (cursor) url.searchParams.set('cursor', cursor)
|
||||
if (cursor) url.searchParams.set('from', cursor)
|
||||
|
||||
const res = await doGetRequest(url)
|
||||
|
||||
|
|
|
@ -138,9 +138,13 @@ export interface components {
|
|||
}
|
||||
GetAllPublicPostsResponse: {
|
||||
posts: components['schemas']['PublicPostDto'][]
|
||||
/** Format: uuid */
|
||||
next: string | null
|
||||
}
|
||||
GetAuthorPostsResponse: {
|
||||
posts: components['schemas']['AuthorPostDto'][]
|
||||
/** Format: uuid */
|
||||
next: string | null
|
||||
}
|
||||
PublicPostAuthorDto: {
|
||||
/** Format: uuid */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue