j'oublie
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
|
//SESSION
|
||||||
export async function getSessionsOfUserAPI(user:Coach|Athlete){
|
export async function getSessionsOfUserAPI(user:Coach|Athlete){
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user