feat: endpoints voor /, /:id en /:id/students in routes/class.ts zijn geimplementeerd
This commit is contained in:
parent
123fdf0fa1
commit
241fe0103f
7 changed files with 95 additions and 34 deletions
|
@ -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,
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue