Zaebalsya

This commit is contained in:
2025-12-17 20:19:26 +07:00
parent 7e7cdbcd76
commit 0b3837b08e
6 changed files with 267 additions and 35 deletions

View File

@@ -79,8 +79,9 @@ export const gamesApi = {
await client.delete(`/challenges/${id}`)
},
previewChallenges: async (marathonId: number): Promise<ChallengesPreviewResponse> => {
const response = await client.post<ChallengesPreviewResponse>(`/marathons/${marathonId}/preview-challenges`)
previewChallenges: async (marathonId: number, gameIds?: number[]): Promise<ChallengesPreviewResponse> => {
const data = gameIds?.length ? { game_ids: gameIds } : undefined
const response = await client.post<ChallengesPreviewResponse>(`/marathons/${marathonId}/preview-challenges`, data)
return response.data
},