refactor: joinrequests uit classdto

This commit is contained in:
Gabriellvl 2025-04-06 17:18:13 +02:00
parent db3c531038
commit 6c3dbc99bb
4 changed files with 7 additions and 4 deletions

View file

@ -67,6 +67,11 @@ export async function getClassStudents(classId: string, full: boolean): Promise<
return cls.students.map((student) => student.username);
}
export async function getClassStudentsDTO(classId: string): Promise<StudentDTO[]> {
const cls = await fetchClass(classId);
return cls.students.map(mapToStudentDTO);
}
export async function getClassTeachers(classId: string, full: boolean): Promise<TeacherDTO[] | string[]> {
const cls = await fetchClass(classId);