Files
game-marathon/frontend/src/api/challenges.ts

10 lines
287 B
TypeScript
Raw Normal View History

2025-12-15 03:22:29 +07:00
import client from './client'
import type { Challenge } from '@/types'
export const challengesApi = {
list: async (marathonId: number): Promise<Challenge[]> => {
const response = await client.get<Challenge[]>(`/marathons/${marathonId}/challenges`)
return response.data
},
}