getByID
This commit is contained in:
@@ -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`),
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user