Add events
This commit is contained in:
9
frontend/src/api/challenges.ts
Normal file
9
frontend/src/api/challenges.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
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
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user