aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+signup/+verify-account
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-01-21 11:03:25 +0100
committerChocobozzz <me@florianbigard.com>2022-01-21 11:03:25 +0100
commitd92d070c91ee73657f2e3a5756954ef63fdba306 (patch)
tree7948b03e025b8878d64c45b5a969871667dab5f1 /client/src/app/+signup/+verify-account
parentcce70ae5ca3a2bfd893a7a8c457086151470de70 (diff)
downloadPeerTube-d92d070c91ee73657f2e3a5756954ef63fdba306.tar.gz
PeerTube-d92d070c91ee73657f2e3a5756954ef63fdba306.tar.zst
PeerTube-d92d070c91ee73657f2e3a5756954ef63fdba306.zip
Split user service
Diffstat (limited to 'client/src/app/+signup/+verify-account')
-rw-r--r--client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts7
-rw-r--r--client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts7
-rw-r--r--client/src/app/+signup/+verify-account/verify-account.module.ts4
3 files changed, 10 insertions, 8 deletions
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 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { Notifier, RedirectService, ServerService, UserService } from '@app/core' 2import { Notifier, RedirectService, ServerService } from '@app/core'
3import { USER_EMAIL_VALIDATOR } from '@app/shared/form-validators/user-validators' 3import { USER_EMAIL_VALIDATOR } from '@app/shared/form-validators/user-validators'
4import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' 4import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
5import { UserSignupService } from '@app/shared/shared-users'
5 6
6@Component({ 7@Component({
7 selector: 'my-verify-account-ask-send-email', 8 selector: 'my-verify-account-ask-send-email',
@@ -14,7 +15,7 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements
14 15
15 constructor ( 16 constructor (
16 protected formValidatorService: FormValidatorService, 17 protected formValidatorService: FormValidatorService,
17 private userService: UserService, 18 private userSignupService: UserSignupService,
18 private serverService: ServerService, 19 private serverService: ServerService,
19 private notifier: Notifier, 20 private notifier: Notifier,
20 private redirectService: RedirectService 21 private redirectService: RedirectService
@@ -33,7 +34,7 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements
33 34
34 askSendVerifyEmail () { 35 askSendVerifyEmail () {
35 const email = this.form.value['verify-email-email'] 36 const email = this.form.value['verify-email-email']
36 this.userService.askSendVerifyEmail(email) 37 this.userSignupService.askSendVerifyEmail(email)
37 .subscribe({ 38 .subscribe({
38 next: () => { 39 next: () => {
39 this.notifier.success($localize`An email with verification link will be sent to ${email}.`) 40 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 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { ActivatedRoute } from '@angular/router' 2import { ActivatedRoute } from '@angular/router'
3import { AuthService, Notifier, UserService } from '@app/core' 3import { AuthService, Notifier } from '@app/core'
4import { UserSignupService } from '@app/shared/shared-users'
4 5
5@Component({ 6@Component({
6 selector: 'my-verify-account-email', 7 selector: 'my-verify-account-email',
@@ -16,7 +17,7 @@ export class VerifyAccountEmailComponent implements OnInit {
16 private verificationString: string 17 private verificationString: string
17 18
18 constructor ( 19 constructor (
19 private userService: UserService, 20 private userSignupService: UserSignupService,
20 private authService: AuthService, 21 private authService: AuthService,
21 private notifier: Notifier, 22 private notifier: Notifier,
22 private route: ActivatedRoute 23 private route: ActivatedRoute
@@ -37,7 +38,7 @@ export class VerifyAccountEmailComponent implements OnInit {
37 } 38 }
38 39
39 verifyEmail () { 40 verifyEmail () {
40 this.userService.verifyEmail(this.userId, this.verificationString, this.isPendingEmail) 41 this.userSignupService.verifyEmail(this.userId, this.verificationString, this.isPendingEmail)
41 .subscribe({ 42 .subscribe({
42 next: () => { 43 next: () => {
43 if (this.authService.isLoggedIn()) { 44 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 @@
1import { NgModule } from '@angular/core' 1import { NgModule } from '@angular/core'
2import { SignupSharedModule } from '../shared/signup-shared.module' 2import { SharedSignupModule } from '../shared/shared-signup.module'
3import { VerifyAccountAskSendEmailComponent } from './verify-account-ask-send-email/verify-account-ask-send-email.component' 3import { VerifyAccountAskSendEmailComponent } from './verify-account-ask-send-email/verify-account-ask-send-email.component'
4import { VerifyAccountEmailComponent } from './verify-account-email/verify-account-email.component' 4import { VerifyAccountEmailComponent } from './verify-account-email/verify-account-email.component'
5import { VerifyAccountRoutingModule } from './verify-account-routing.module' 5import { VerifyAccountRoutingModule } from './verify-account-routing.module'
@@ -8,7 +8,7 @@ import { VerifyAccountRoutingModule } from './verify-account-routing.module'
8 imports: [ 8 imports: [
9 VerifyAccountRoutingModule, 9 VerifyAccountRoutingModule,
10 10
11 SignupSharedModule 11 SharedSignupModule
12 ], 12 ],
13 13
14 declarations: [ 14 declarations: [