feat: endpoints voor /, /:id en /:id/students in routes/class.ts zijn geimplementeerd

This commit is contained in:
Adriaan Jacquet 2025-03-05 16:31:27 +01:00
parent 123fdf0fa1
commit 241fe0103f
7 changed files with 95 additions and 34 deletions

View file

@ -1,3 +1,5 @@
import { Student } from "../entities/users/student.entity";
export interface StudentDTO {
id: string;
username: string;
@ -10,3 +12,12 @@ export interface StudentDTO {
groups: string;
};
}
export function mapToStudentDTO(student: Student): StudentDTO {
return {
id: student.username,
username: student.username,
firstName: student.firstName,
lastName: student.lastName,
};
}