From d12b40fb96d56786a96c06a621f3d8e0a0d24f4a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 Oct 2022 11:06:28 +0200 Subject: Implement two factor in client --- client/src/app/+signup/+register/register.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/src/app/+signup/+register') diff --git a/client/src/app/+signup/+register/register.component.ts b/client/src/app/+signup/+register/register.component.ts index 4ab327b1b..958770ebf 100644 --- a/client/src/app/+signup/+register/register.component.ts +++ b/client/src/app/+signup/+register/register.component.ts @@ -158,7 +158,7 @@ export class RegisterComponent implements OnInit { } // Auto login - this.authService.login(body.username, body.password) + this.authService.login({ username: body.username, password: body.password }) .subscribe({ next: () => { this.signupSuccess = true -- cgit v1.2.3 From 5c5bcea2e64daf0a66a796c89432732ed27308d2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 Oct 2022 15:26:53 +0200 Subject: Refactor form reactive --- .../+signup/+register/steps/register-step-channel.component.ts | 4 ++-- .../app/+signup/+register/steps/register-step-terms.component.ts | 8 +++----- .../app/+signup/+register/steps/register-step-user.component.ts | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) (limited to 'client/src/app/+signup/+register') diff --git a/client/src/app/+signup/+register/steps/register-step-channel.component.ts b/client/src/app/+signup/+register/steps/register-step-channel.component.ts index c10b568ba..df92c5145 100644 --- a/client/src/app/+signup/+register/steps/register-step-channel.component.ts +++ b/client/src/app/+signup/+register/steps/register-step-channel.component.ts @@ -3,7 +3,7 @@ import { pairwise } from 'rxjs/operators' import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' import { FormGroup } from '@angular/forms' import { VIDEO_CHANNEL_DISPLAY_NAME_VALIDATOR, VIDEO_CHANNEL_NAME_VALIDATOR } from '@app/shared/form-validators/video-channel-validators' -import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' +import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' import { UserSignupService } from '@app/shared/shared-users' @Component({ @@ -19,7 +19,7 @@ export class RegisterStepChannelComponent extends FormReactive implements OnInit @Output() formBuilt = new EventEmitter() constructor ( - protected formValidatorService: FormValidatorService, + protected formReactiveService: FormReactiveService, private userSignupService: UserSignupService ) { super() diff --git a/client/src/app/+signup/+register/steps/register-step-terms.component.ts b/client/src/app/+signup/+register/steps/register-step-terms.component.ts index 87d16696e..2df963b30 100644 --- a/client/src/app/+signup/+register/steps/register-step-terms.component.ts +++ b/client/src/app/+signup/+register/steps/register-step-terms.component.ts @@ -1,9 +1,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' import { FormGroup } from '@angular/forms' -import { - USER_TERMS_VALIDATOR -} from '@app/shared/form-validators/user-validators' -import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' +import { USER_TERMS_VALIDATOR } from '@app/shared/form-validators/user-validators' +import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' @Component({ selector: 'my-register-step-terms', @@ -19,7 +17,7 @@ export class RegisterStepTermsComponent extends FormReactive implements OnInit { @Output() codeOfConductClick = new EventEmitter() constructor ( - protected formValidatorService: FormValidatorService + protected formReactiveService: FormReactiveService ) { super() } diff --git a/client/src/app/+signup/+register/steps/register-step-user.component.ts b/client/src/app/+signup/+register/steps/register-step-user.component.ts index b89e38a28..822f8f5c5 100644 --- a/client/src/app/+signup/+register/steps/register-step-user.component.ts +++ b/client/src/app/+signup/+register/steps/register-step-user.component.ts @@ -8,7 +8,7 @@ import { USER_PASSWORD_VALIDATOR, USER_USERNAME_VALIDATOR } from '@app/shared/form-validators/user-validators' -import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' +import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' import { UserSignupService } from '@app/shared/shared-users' @Component({ @@ -23,7 +23,7 @@ export class RegisterStepUserComponent extends FormReactive implements OnInit { @Output() formBuilt = new EventEmitter() constructor ( - protected formValidatorService: FormValidatorService, + protected formReactiveService: FormReactiveService, private userSignupService: UserSignupService ) { super() -- cgit v1.2.3