fix en cours
This commit is contained in:
@@ -128,9 +128,10 @@ export async function postActivityAPI(session: Session, activity: Activite){
|
||||
|
||||
export async function postAthlete(athlete: Athlete):Promise<Athlete>{
|
||||
try {
|
||||
const response = await api.post<Athlete>("/athlete/create/",athlete.toDTO);
|
||||
//const response = await api.post<Athlete>("/athlete/create/",athlete.toDTO);
|
||||
const response = await athleteService.create(athlete.toDTO());
|
||||
console.log(response);
|
||||
return response.data;
|
||||
return new Athlete(response.data);
|
||||
} catch (error) {
|
||||
console.error("Error fetching coachs:", error);
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user