feat: add setup wizard

This commit is contained in:
Elias Schneider
2022-12-01 23:07:49 +01:00
parent 493705e4ef
commit b579b8f330
32 changed files with 689 additions and 179 deletions

View File

@@ -1,18 +1,17 @@
import { Expose, plainToClass } from "class-transformer";
import { IsEmail, IsNotEmpty, IsString } from "class-validator";
import { IsEmail, IsNotEmpty, IsOptional, IsString } from "class-validator";
export class UserDTO {
@Expose()
id: string;
@Expose()
firstName: string;
@IsOptional()
@IsString()
username: string;
@Expose()
lastName: string;
@Expose()
@IsNotEmpty()
@IsOptional()
@IsEmail()
email: string;
@@ -20,6 +19,9 @@ export class UserDTO {
@IsString()
password: string;
@Expose()
isAdmin: boolean;
from(partial: Partial<UserDTO>) {
return plainToClass(UserDTO, partial, { excludeExtraneousValues: true });
}