offset-limit-fix-2
This commit is contained in:
parent
00a0f9886c
commit
cb3748a731
|
@ -19,27 +19,27 @@ export const useReactionsStore = (initial?: Reaction[]) => {
|
||||||
|
|
||||||
export const loadArticleReactions = async ({
|
export const loadArticleReactions = async ({
|
||||||
articleSlug,
|
articleSlug,
|
||||||
page,
|
limit = 100,
|
||||||
size
|
offset = 0
|
||||||
}: {
|
}: {
|
||||||
articleSlug: string
|
articleSlug: string
|
||||||
page: number
|
limit?: number
|
||||||
size: number
|
offset?: number
|
||||||
}): Promise<void> => {
|
}): Promise<void> => {
|
||||||
const resp = await apiClient.getArticleReactions({ articleSlug, page, size })
|
const resp = await apiClient.getArticleReactions({ articleSlug, limit, offset })
|
||||||
reactionsOrdered.set(resp)
|
reactionsOrdered.set(resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadReactions = async ({
|
export const loadReactions = async ({
|
||||||
shoutSlugs,
|
shoutSlugs,
|
||||||
page,
|
limit = 100,
|
||||||
size
|
offset = 0
|
||||||
}: {
|
}: {
|
||||||
shoutSlugs: string[]
|
shoutSlugs: string[]
|
||||||
page: number
|
limit: number
|
||||||
size: number
|
offset: number
|
||||||
}): Promise<void> => {
|
}): Promise<void> => {
|
||||||
const reactions = await apiClient.getReactionsForShouts({ shoutSlugs, page, size })
|
const reactions = await apiClient.getReactionsForShouts({ shoutSlugs, limit, offset })
|
||||||
reactionsOrdered.set(reactions)
|
reactionsOrdered.set(reactions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user