diff --git a/server/src/routes/timeslot.ts b/server/src/routes/timeslot.ts index 3785f46..0fa8380 100644 --- a/server/src/routes/timeslot.ts +++ b/server/src/routes/timeslot.ts @@ -204,6 +204,8 @@ router.get("/timeslot", async (req: Request, res: Response) => { } } + trainerWithAvailableTimeslots.timeslots.sort((a,b)=>a.startDate.localeCompare(b.startDate)); + trainers.push(trainerWithAvailableTimeslots); }