refactor: joinrequests uit classdto
This commit is contained in:
parent
db3c531038
commit
6c3dbc99bb
4 changed files with 7 additions and 4 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue