From 1378c0d343028f3d40d7d795422684ab9e6a1599 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Aug 2021 11:27:47 +0200 Subject: Fix client lint --- .../users/user-edit/user-update.component.ts | 39 ++++++++++++---------- 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'client/src/app/+admin/users/user-edit/user-update.component.ts') diff --git a/client/src/app/+admin/users/user-edit/user-update.component.ts b/client/src/app/+admin/users/user-edit/user-update.component.ts index 1527508f7..2128ba4fd 100644 --- a/client/src/app/+admin/users/user-edit/user-update.component.ts +++ b/client/src/app/+admin/users/user-edit/user-update.component.ts @@ -59,11 +59,12 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { this.paramsSub = this.route.params.subscribe(routeParams => { const userId = routeParams['id'] - this.userService.getUser(userId, true).subscribe( - user => this.onUserFetched(user), + this.userService.getUser(userId, true) + .subscribe({ + next: user => this.onUserFetched(user), - err => this.error = err.message - ) + error: err => this.error = err.message + }) }) } @@ -83,14 +84,15 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { if (userUpdate.pluginAuth === 'null') userUpdate.pluginAuth = null - this.userService.updateUser(this.user.id, userUpdate).subscribe( - () => { - this.notifier.success($localize`User ${this.user.username} updated.`) - this.router.navigate([ '/admin/users/list' ]) - }, + this.userService.updateUser(this.user.id, userUpdate) + .subscribe({ + next: () => { + this.notifier.success($localize`User ${this.user.username} updated.`) + this.router.navigate([ '/admin/users/list' ]) + }, - err => this.error = err.message - ) + error: err => this.error = err.message + }) } isCreation () { @@ -106,13 +108,14 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { } resetPassword () { - this.userService.askResetPassword(this.user.email).subscribe( - () => { - this.notifier.success($localize`An email asking for password reset has been sent to ${this.user.username}.`) - }, - - err => this.error = err.message - ) + this.userService.askResetPassword(this.user.email) + .subscribe({ + next: () => { + this.notifier.success($localize`An email asking for password reset has been sent to ${this.user.username}.`) + }, + + error: err => this.error = err.message + }) } private onUserFetched (userJson: UserType) { -- cgit v1.2.3