This commit is contained in:
tuanvu
2026-01-09 15:23:21 +01:00
parent 6156df6fef
commit 9269989130
2 changed files with 4 additions and 3 deletions

View File

@@ -80,7 +80,8 @@ 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`),
getByKeycloakId: (id: number | string) => api.get(`/coach/${id}`),
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),
delete: (id: number | string) => api.delete(`/coach/delete/${id}`),
getSessionsForCoach: (coachId: number | string) => api.get(`/coach/${coachId}/session`),

View File

@@ -1,5 +1,5 @@
import { useKeycloak } from "@react-keycloak/web"
import { getAllCoach, getUsersAPI, postAdmin } from "../requetes"
import { getAllCoach } from "../requetes"
import { Admin } from "../classes";
@@ -15,7 +15,7 @@ function TestAPI(){
admin.nom = "admin";
admin.email = "admin@gmail.com";
postAdmin(admin);
//createAdminAPI(admin);
}
return(