get session de l'user dans edt

This commit is contained in:
trochas
2026-01-10 12:47:08 +01:00
parent fca7362bb7
commit 8d844d2b2f
6 changed files with 68 additions and 23 deletions

View File

@@ -45,7 +45,7 @@ export const athleteService = {
delete: (id: number | string) => api.delete(`/athlete/${id}`),
// session-related endpoints exposed by AthleteResource
getSessionsForAthlete: (athleteId: number | null) => api.get(`/athletes/athlete/${athleteId}/session`),
getSessionsForAthlete: (athleteId: number | null) => api.get<SessionDTO[]>(`/athletes/athlete/${athleteId}/session`),
getAllSessions: () => api.get(`/athletes/session`),
getActivitiesForSession: (sessionId: number | string) => api.get(`/athletes/session/${sessionId}/activities`),
getSessionsAfterDate: (athleteId: number | string, date: string) => api.get(`/athletes/${athleteId}/session/after/${encodeURIComponent(date)}`),
@@ -85,7 +85,7 @@ export const coachService = {
getByKeycloakId: (keycloakId: string) => api.get(`/coach/keycloak/${keycloakId}`),
update: (id: number | string, data: any) => api.put(`/coach/update/${id}`, data),
delete: (id: number | string) => api.delete(`/coach/delete/${id}`),
getSessionsForCoach: (coachId: number | null) => api.get(`/coach/${coachId}/session`),
getSessionsForCoach: (coachId: number | null) => api.get<SessionDTO[]>(`/coach/${coachId}/session`),
};
export const userService = {