From 1378c0d343028f3d40d7d795422684ab9e6a1599 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Aug 2021 11:27:47 +0200 Subject: Fix client lint --- .../src/app/+signup/+register/register.component.ts | 20 ++++++++++---------- .../verify-account-ask-send-email.component.ts | 10 ++++------ .../verify-account-email.component.ts | 8 ++++---- 3 files changed, 18 insertions(+), 20 deletions(-) (limited to 'client/src/app/+signup') diff --git a/client/src/app/+signup/+register/register.component.ts b/client/src/app/+signup/+register/register.component.ts index 241ca04c6..056442107 100644 --- a/client/src/app/+signup/+register/register.component.ts +++ b/client/src/app/+signup/+register/register.component.ts @@ -122,8 +122,8 @@ export class RegisterComponent implements OnInit { 'filter:api.signup.registration.create.params' ) - this.userService.signup(body).subscribe( - () => { + this.userService.signup(body).subscribe({ + next: () => { this.signupDone = true if (this.requiresEmailVerification) { @@ -133,16 +133,16 @@ export class RegisterComponent implements OnInit { // Auto login this.authService.login(body.username, body.password) - .subscribe( - () => { - this.success = $localize`You are now logged in as ${body.username}!` - }, + .subscribe({ + next: () => { + this.success = $localize`You are now logged in as ${body.username}!` + }, - err => this.error = err.message - ) + error: err => this.error = err.message + }) }, - err => this.error = err.message - ) + error: err => this.error = err.message + }) } } 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 afb0e6d6c..83c24a251 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 @@ -34,15 +34,13 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements askSendVerifyEmail () { const email = this.form.value['verify-email-email'] this.userService.askSendVerifyEmail(email) - .subscribe( - () => { + .subscribe({ + next: () => { this.notifier.success($localize`An email with verification link will be sent to ${email}.`) this.redirectService.redirectToHomepage() }, - err => { - this.notifier.error(err.message) - } - ) + error: err => this.notifier.error(err.message) + }) } } 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 acc688ab3..457a0abe0 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 @@ -38,8 +38,8 @@ export class VerifyAccountEmailComponent implements OnInit { verifyEmail () { this.userService.verifyEmail(this.userId, this.verificationString, this.isPendingEmail) - .subscribe( - () => { + .subscribe({ + next: () => { if (this.authService.isLoggedIn()) { this.authService.refreshUserInformation() } @@ -47,11 +47,11 @@ export class VerifyAccountEmailComponent implements OnInit { this.success = true }, - err => { + error: err => { this.failed = true this.notifier.error(err.message) } - ) + }) } } -- cgit v1.2.3