From d92d070c91ee73657f2e3a5756954ef63fdba306 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 21 Jan 2022 11:03:25 +0100 Subject: Split user service --- .../verify-account-ask-send-email.component.ts | 7 ++++--- .../verify-account-email/verify-account-email.component.ts | 7 ++++--- client/src/app/+signup/+verify-account/verify-account.module.ts | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'client/src/app/+signup/+verify-account') diff --git a/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts b/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts index 83c24a251..a0ed66a3a 100644 --- a/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts +++ b/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts @@ -1,7 +1,8 @@ import { Component, OnInit } from '@angular/core' -import { Notifier, RedirectService, ServerService, UserService } from '@app/core' +import { Notifier, RedirectService, ServerService } from '@app/core' import { USER_EMAIL_VALIDATOR } from '@app/shared/form-validators/user-validators' import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' +import { UserSignupService } from '@app/shared/shared-users' @Component({ selector: 'my-verify-account-ask-send-email', @@ -14,7 +15,7 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements constructor ( protected formValidatorService: FormValidatorService, - private userService: UserService, + private userSignupService: UserSignupService, private serverService: ServerService, private notifier: Notifier, private redirectService: RedirectService @@ -33,7 +34,7 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements askSendVerifyEmail () { const email = this.form.value['verify-email-email'] - this.userService.askSendVerifyEmail(email) + this.userSignupService.askSendVerifyEmail(email) .subscribe({ next: () => { this.notifier.success($localize`An email with verification link will be sent to ${email}.`) diff --git a/client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts b/client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts index 827ec7652..88efce4a1 100644 --- a/client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts +++ b/client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core' import { ActivatedRoute } from '@angular/router' -import { AuthService, Notifier, UserService } from '@app/core' +import { AuthService, Notifier } from '@app/core' +import { UserSignupService } from '@app/shared/shared-users' @Component({ selector: 'my-verify-account-email', @@ -16,7 +17,7 @@ export class VerifyAccountEmailComponent implements OnInit { private verificationString: string constructor ( - private userService: UserService, + private userSignupService: UserSignupService, private authService: AuthService, private notifier: Notifier, private route: ActivatedRoute @@ -37,7 +38,7 @@ export class VerifyAccountEmailComponent implements OnInit { } verifyEmail () { - this.userService.verifyEmail(this.userId, this.verificationString, this.isPendingEmail) + this.userSignupService.verifyEmail(this.userId, this.verificationString, this.isPendingEmail) .subscribe({ next: () => { if (this.authService.isLoggedIn()) { diff --git a/client/src/app/+signup/+verify-account/verify-account.module.ts b/client/src/app/+signup/+verify-account/verify-account.module.ts index 7255605d4..ec342df8d 100644 --- a/client/src/app/+signup/+verify-account/verify-account.module.ts +++ b/client/src/app/+signup/+verify-account/verify-account.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core' -import { SignupSharedModule } from '../shared/signup-shared.module' +import { SharedSignupModule } from '../shared/shared-signup.module' import { VerifyAccountAskSendEmailComponent } from './verify-account-ask-send-email/verify-account-ask-send-email.component' import { VerifyAccountEmailComponent } from './verify-account-email/verify-account-email.component' import { VerifyAccountRoutingModule } from './verify-account-routing.module' @@ -8,7 +8,7 @@ import { VerifyAccountRoutingModule } from './verify-account-routing.module' imports: [ VerifyAccountRoutingModule, - SignupSharedModule + SharedSignupModule ], declarations: [ -- cgit v1.2.3