fix: integratie user + errors gefixt zodat het runt + format
This commit is contained in:
parent
6c4ea0eefb
commit
1b096b411b
55 changed files with 858 additions and 594 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue