diff --git a/routes/(apps)/mobility/(_islands)/ConsultStudents.tsx b/routes/(apps)/mobility/(_islands)/ConsultStudents.tsx index 8513a6b..e1a758b 100644 --- a/routes/(apps)/mobility/(_islands)/ConsultStudents.tsx +++ b/routes/(apps)/mobility/(_islands)/ConsultStudents.tsx @@ -21,7 +21,6 @@ export default function ConsultStudents() { useEffect(() => { const fetchPromotionsAndStudents = async () => { try { - // Récupérer toutes les promotions const promoResponse = await fetch("/mobility/api/promotions"); if (!promoResponse.ok) { throw new Error(`Error fetching promotions: ${promoResponse.statusText}`); @@ -29,14 +28,12 @@ export default function ConsultStudents() { const promos: Promotion[] = await promoResponse.json(); setPromotions(promos); - // Récupérer les étudiants const studentsResponse = await fetch("/mobility/api/insert_students"); if (!studentsResponse.ok) { throw new Error(`Error fetching students: ${studentsResponse.statusText}`); } const students: Student[] = await studentsResponse.json(); - // Grouper les étudiants par promotionId const grouped: Record = {}; for (const student of students) { if (!grouped[student.promotionId]) { diff --git a/routes/(apps)/mobility/api/promo.ts b/routes/(apps)/mobility/api/promotions.ts similarity index 100% rename from routes/(apps)/mobility/api/promo.ts rename to routes/(apps)/mobility/api/promotions.ts