Merge remote-tracking branch 'origin/feat/endpoints-beschermen-met-authenticatie-#105' into feat/endpoints-beschermen-met-authenticatie-#105

This commit is contained in:
Gabriellvl 2025-05-15 21:07:10 +02:00
commit 4925a9bdb7
19 changed files with 26 additions and 26 deletions

View file

@ -100,13 +100,9 @@ export async function getStudentsByTeacher(username: string, full: boolean): Pro
const classIds: string[] = classes.map((cls) => cls.id);
const students: StudentDTO[] = (await Promise.all(
classIds.map(async (classId) => await getClassStudentsDTO(classId))
))
const students: StudentDTO[] = (await Promise.all(classIds.map(async (classId) => await getClassStudentsDTO(classId))))
.flat()
.filter((student, index, self) =>
self.findIndex((s) => s.username === student.username) === index
);
.filter((student, index, self) => self.findIndex((s) => s.username === student.username) === index);
if (full) {
return students;