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,22 +1,26 @@
import { TeacherInvitation } from "../entities/classes/teacher-invitation.entity.js";
import { ClassDTO, mapToClassDTO } from "./classes.js";
import { mapToTeacherDTO, TeacherDTO } from "./teacher.js";
import { TeacherInvitation } from '../entities/classes/teacher-invitation.entity.js';
import { ClassDTO, mapToClassDTO } from './class.js';
import { mapToUserDTO, UserDTO } from './user.js';
export interface TeacherInvitationDTO {
sender: string | TeacherDTO,
receiver: string | TeacherDTO,
class: string | ClassDTO,
sender: string | UserDTO;
receiver: string | UserDTO;
class: string | ClassDTO;
}
export function mapToTeacherInvitationDTO(invitation: TeacherInvitation): TeacherInvitationDTO {
export function mapToTeacherInvitationDTO(
invitation: TeacherInvitation
): TeacherInvitationDTO {
return {
sender: mapToTeacherDTO(invitation.sender),
receiver: mapToTeacherDTO(invitation.receiver),
sender: mapToUserDTO(invitation.sender),
receiver: mapToUserDTO(invitation.receiver),
class: mapToClassDTO(invitation.class),
};
}
export function mapToTeacherInvitationDTOIds(invitation: TeacherInvitation): TeacherInvitationDTO {
export function mapToTeacherInvitationDTOIds(
invitation: TeacherInvitation
): TeacherInvitationDTO {
return {
sender: invitation.sender.username,
receiver: invitation.receiver.username,