From 10cd782a52d9c359e9f8a6c5c399ff5a0ed9635b Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 25 Aug 2022 17:52:23 +0200 Subject: [PATCH] Added dto for profile page --- dto/src/requests/auth.ts | 16 ++++++++++------ dto/src/responses/auth.ts | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/dto/src/requests/auth.ts b/dto/src/requests/auth.ts index d7b9940..50ed258 100644 --- a/dto/src/requests/auth.ts +++ b/dto/src/requests/auth.ts @@ -23,18 +23,22 @@ export class LoginRequest extends SignUpRequest { otp?: string; } -export class TfaComplete extends BaseRequest { - @IsNotEmpty() - @IsString() - code: string; -} - export class TfaSetup extends BaseRequest { @IsNotEmpty() @IsBoolean() mail: boolean; } +export class TfaComplete extends BaseRequest { + @IsNotEmpty() + @IsBoolean() + mail: boolean; + + @IsNotEmpty() + @IsString() + code: string; +} + export class ChangePasswordRequest extends BaseRequest { @IsNotEmpty() @IsString() diff --git a/dto/src/responses/auth.ts b/dto/src/responses/auth.ts index fd97cb5..76de70b 100644 --- a/dto/src/responses/auth.ts +++ b/dto/src/responses/auth.ts @@ -36,4 +36,5 @@ export class RequestEmailTfaResponse extends SuccessResponse {} export class TfaCompletedResponse extends SuccessResponse {} export class SignupResponse extends SuccessResponse {} export class ChangePasswordResponse extends SuccessResponse {} +export class LogoutAllResponse extends SuccessResponse {} export class RefreshResponse extends LoginResponse {}