fix(api): align list defaults with backend page limits

This commit is contained in:
zetaloop
2026-04-24 08:55:48 +08:00
parent ff03532da4
commit 3b82602c38
10 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ type Paginated<T> = {
}
export async function listPlayers(): Promise<Player[]> {
const res = await httpJson<Paginated<Player>>("/api/v1/players?offset=0&limit=1000", {
const res = await httpJson<Paginated<Player>>("/api/v1/players?offset=0&limit=100", {
cache: "no-store",
})
return res.items
@@ -37,7 +37,7 @@ export async function getPlayerById(playerId: string): Promise<Player | undefine
export async function listPlayersByShop(shopId: string): Promise<Player[]> {
const res = await httpJson<Paginated<Player>>(
`/api/v1/shops/${encodeURIComponent(shopId)}/players?offset=0&limit=1000`,
`/api/v1/shops/${encodeURIComponent(shopId)}/players?offset=0&limit=100`,
{ cache: "no-store" },
)
return res.items