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
  },
}
