Merge branch 'main' of https://gitlab2.istic.univ-rennes1.fr/tuvu/hackathon
This commit is contained in:
@@ -199,6 +199,16 @@ export async function getAllUserAPI(): Promise<User[]> {
|
||||
}
|
||||
}
|
||||
|
||||
export async function getCoachByIdAPI(id:number): Promise<Coach|null> {
|
||||
try{
|
||||
const response = await coachService.getById(id);
|
||||
return new Coach(response.data);
|
||||
}catch (error) {
|
||||
console.error("Error fetching coach by id:", error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
//SESSION
|
||||
export async function getSessionsOfUserAPI(user:Coach|Athlete){
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user