fix(api): align API layer with backend response formats
- wallet: parse {balance: string} response
- favorites: addFavorite returns void (EmptyResp)
- services: handle paginated response from listServicesByPlayer
- files: use query param ?key= instead of path param /:id
- search: remove unsupported selectedGames/minRating params
This commit is contained in:
@@ -39,8 +39,8 @@ export async function isFavorited(
|
||||
export async function addFavorite(input: {
|
||||
targetType: "player" | "shop"
|
||||
targetId: string
|
||||
}): Promise<Favorite> {
|
||||
return await httpJson<Favorite>("/api/v1/favorites", {
|
||||
}): Promise<void> {
|
||||
await httpJson<unknown>("/api/v1/favorites", {
|
||||
method: "POST",
|
||||
json: input,
|
||||
cache: "no-store",
|
||||
|
||||
Reference in New Issue
Block a user