refactor(common): User
This commit is contained in:
parent
1a0704c16f
commit
3b51b0f1f6
4 changed files with 16 additions and 15 deletions
|
@ -1,7 +1,8 @@
|
|||
import { TeacherInvitation } from '../entities/classes/teacher-invitation.entity.js';
|
||||
import { mapToClassDTO } from './class.js';
|
||||
import { mapToUserDTO, UserDTO } from './user.js';
|
||||
import { mapToUserDTO } from './user.js';
|
||||
import { ClassDTO } from 'dwengo-1-common/src/interfaces/class';
|
||||
import { UserDTO } from 'dwengo-1-common/src/interfaces/user';
|
||||
|
||||
export interface TeacherInvitationDTO {
|
||||
sender: string | UserDTO;
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
import { User } from '../entities/users/user.entity.js';
|
||||
|
||||
export interface UserDTO {
|
||||
id?: string;
|
||||
username: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
endpoints?: {
|
||||
self: string;
|
||||
classes: string;
|
||||
questions: string;
|
||||
invitations: string;
|
||||
};
|
||||
}
|
||||
import { UserDTO } from 'dwengo-1-common/src/interfaces/user';
|
||||
|
||||
export function mapToUserDTO(user: User): UserDTO {
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue