From 123fdf0fa11b0311399f50f0fbc7c64c9b91b318 Mon Sep 17 00:00:00 2001 From: Adriaan Jacquet Date: Wed, 5 Mar 2025 15:57:29 +0100 Subject: [PATCH] fix: code teruggezet die veroorzaakt werd door bug in backend/src/entities --- backend/src/services/students.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/backend/src/services/students.ts b/backend/src/services/students.ts index 4bfd7673..3a1b601f 100644 --- a/backend/src/services/students.ts +++ b/backend/src/services/students.ts @@ -30,14 +30,7 @@ async function fetchStudentClasses(username: string): Promise { if (!student) return []; const classRepository = getClassRepository(); - // a weird error when running npm run dev occurs when using .findByStudent - // the error says that the function could not be found which is weird - // because typescript does not throw any errors - const classes = await classRepository.find( - { students: student }, - { populate: ["students", "teachers"] } // voegt student en teacher objecten toe - ) - // const classes = await classRepository.findByStudent(student); + const classes = await classRepository.findByStudent(student); if (!classes) return [];