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,7 +1,7 @@
|
|||
import { User } from "../entities/users/user.entity.js";
|
||||
import { User } from '../entities/users/user.entity.js';
|
||||
|
||||
export interface UserDTO {
|
||||
id?: string,
|
||||
id?: string;
|
||||
username: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
|
@ -22,7 +22,10 @@ export function mapToUserDTO(user: User): UserDTO {
|
|||
};
|
||||
}
|
||||
|
||||
export function mapToUser<T extends User>(userData: UserDTO, userInstance: T): T {
|
||||
export function mapToUser<T extends User>(
|
||||
userData: UserDTO,
|
||||
userInstance: T
|
||||
): T {
|
||||
userInstance.username = userData.username;
|
||||
userInstance.firstName = userData.firstName;
|
||||
userInstance.lastName = userData.lastName;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue