ressourcePanel getAll

This commit is contained in:
trochas
2026-01-10 17:38:40 +01:00
parent 9aeef08e65
commit e85f76c810
3 changed files with 36 additions and 8 deletions

View File

@@ -38,7 +38,7 @@ export function clearAuthToken() {
export const athleteService = {
// controller is mounted at /athlete
create: (data: any) => api.post<AthleteDTO>("/athlete/create", data),
getAll: () => api.get("/athlete/all"),
getAll: () => api.get<AthleteDTO[]>("/athlete/all"),
getById: (id: number | string) => api.get(`/athlete/${id}`),
getByKeycloakId: (keycloakId: string) => api.get(`/athlete/keycloak/${encodeURIComponent(keycloakId)}`),
update: (id: number | string, data: any) => api.put(`/athlete/${id}`, data),
@@ -58,7 +58,7 @@ export const activiteService = {
delete: (id: number | string) => api.delete(`/activite/delete/${id}`),
update: (id: number | string, data: ActiviteDTO) => api.post(`/activite/update/${id}`, data),
getById: (id: number | string) => api.get(`/activite/${id}`),
getAll: () => api.get(`/activite/all`),
getAll: () => api.get<ActiviteDTO[]>(`/activite/all`),
getByTheme: (theme: string) => api.get(`/activite/theme/${encodeURIComponent(theme)}`),
getDataActivite: (id: number | string) => api.get(`/activite/${id}`),
};
@@ -80,7 +80,7 @@ export const sessionService = {
export const coachService = {
// controller doesn't declare a class-level path consistently; support both common patterns
create: (data: any) => api.post<CoachDTO>(`/coach/create`, data),
getAll: () => api.get(`/coach/all`),
getAll: () => api.get<CoachDTO[]>(`/coach/all`),
getById: (id: number) => api.get(`/coach/${id}`),
getByKeycloakId: (keycloakId: string) => api.get(`/coach/keycloak/${keycloakId}`),
update: (id: number | string, data: any) => api.put(`/coach/update/${id}`, data),