From 1378c0d343028f3d40d7d795422684ab9e6a1599 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Aug 2021 11:27:47 +0200 Subject: Fix client lint --- client/src/app/+login/login.component.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'client/src/app/+login/login.component.ts') diff --git a/client/src/app/+login/login.component.ts b/client/src/app/+login/login.component.ts index 9731383af..16876afd6 100644 --- a/client/src/app/+login/login.component.ts +++ b/client/src/app/+login/login.component.ts @@ -107,17 +107,17 @@ export class LoginComponent extends FormReactive implements OnInit, AfterViewIni const { username, password } = this.form.value this.authService.login(username, password) - .subscribe( - () => this.redirectService.redirectToPreviousRoute(), + .subscribe({ + next: () => this.redirectService.redirectToPreviousRoute(), - err => this.handleError(err) - ) + error: err => this.handleError(err) + }) } askResetPassword () { this.userService.askResetPassword(this.forgotPasswordEmail) - .subscribe( - () => { + .subscribe({ + next: () => { const message = $localize`An email with the reset password instructions will be sent to ${this.forgotPasswordEmail}. The link will expire within 1 hour.` @@ -125,8 +125,8 @@ The link will expire within 1 hour.` this.hideForgotPasswordModal() }, - err => this.notifier.error(err.message) - ) + error: err => this.notifier.error(err.message) + }) } openForgotPasswordModal () { @@ -149,14 +149,14 @@ The link will expire within 1 hour.` this.isAuthenticatedWithExternalAuth = true this.authService.login(username, null, token) - .subscribe( - () => this.redirectService.redirectToPreviousRoute(), - - err => { - this.handleError(err) - this.isAuthenticatedWithExternalAuth = false - } - ) + .subscribe({ + next: () => this.redirectService.redirectToPreviousRoute(), + + error: err => { + this.handleError(err) + this.isAuthenticatedWithExternalAuth = false + } + }) } private handleError (err: any) { -- cgit v1.2.3