fix: interface bestanden enkelvoud

This commit is contained in:
Gabriellvl 2025-03-08 09:36:03 +01:00
parent 9c9e7c4870
commit 4968d7cb07
12 changed files with 20 additions and 20 deletions

View file

@ -0,0 +1,25 @@
import { Class } from "../entities/classes/class.entity";
export interface ClassDTO {
id: string;
displayName: string;
teachers: string[];
students: string[];
joinRequests: string[];
endpoints?: {
self: string;
invitations: string;
assignments: string;
students: string;
};
}
export function mapToClassDTO(cls: Class): ClassDTO {
return {
id: cls.classId,
displayName: cls.displayName,
teachers: cls.teachers.map(teacher => teacher.username),
students: cls.students.map(student => student.username),
joinRequests: [], // TODO
}
};