10 lines
287 B
TypeScript
10 lines
287 B
TypeScript
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
|
|
},
|
|
}
|