This commit is contained in:
trochas
2026-01-09 12:58:37 +01:00
4 changed files with 9 additions and 6 deletions

View File

@@ -135,10 +135,9 @@ 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 athleteService.create(athlete.toDTO());
const response = await api.post<Athlete>("/athlete/create/",athlete.toDTO);
console.log(response);
return new Athlete(response.data);
return response.data;
} catch (error) {
console.error("Error fetching coachs:", error);
throw error;