fix(api): skip unavailable backend routes
This commit is contained in:
+2
-5
@@ -36,9 +36,6 @@ 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=100`,
|
||||
{ cache: "no-store" },
|
||||
)
|
||||
return res.items
|
||||
const players = await listPlayers()
|
||||
return players.filter((player) => player.shopId === shopId)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user