fix: integratie user + errors gefixt zodat het runt + format

This commit is contained in:
Gabriellvl 2025-03-09 23:59:31 +01:00
parent 6c4ea0eefb
commit 1b096b411b
55 changed files with 858 additions and 594 deletions

View file

@ -1,36 +0,0 @@
import { Teacher } from "../entities/users/teacher.entity.js";
/**
* Teacher Data Transfer Object
*/
export interface TeacherDTO {
username: string;
firstName: string;
lastName: string;
endpoints?: {
self: string;
classes: string;
questions: string;
invitations: string;
};
}
/**
* Maps a Teacher entity to a TeacherDTO
*/
export function mapToTeacherDTO(teacher: Teacher): TeacherDTO {
return {
username: teacher.username,
firstName: teacher.firstName,
lastName: teacher.lastName,
};
}
export function mapToTeacher(teacherData: TeacherDTO): Teacher {
const teacher = new Teacher();
teacher.username = teacherData.username;
teacher.firstName = teacherData.firstName;
teacher.lastName = teacherData.lastName;
return teacher;
}