From 1378c0d343028f3d40d7d795422684ab9e6a1599 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Aug 2021 11:27:47 +0200 Subject: Fix client lint --- .../my-account-applications.component.ts | 30 ++++++++++------------ 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'client/src/app/+my-account/my-account-applications') diff --git a/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts b/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts index 5e9525fbb..6873c7d40 100644 --- a/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts +++ b/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core' -import { AuthService, Notifier, ConfirmService, ScopedTokensService } from '@app/core' +import { AuthService, ConfirmService, Notifier, ScopedTokensService } from '@app/core' import { VideoService } from '@app/shared/shared-main' import { FeedFormat } from '@shared/models' import { ScopedToken } from '@shared/models/users/user-scoped-token' @@ -27,13 +27,11 @@ export class MyAccountApplicationsComponent implements OnInit { ngOnInit () { this.feedUrl = this.baseURL this.scopedTokensService.getScopedTokens() - .subscribe( - tokens => this.regenApplications(tokens), + .subscribe({ + next: tokens => this.regenApplications(tokens), - err => { - this.notifier.error(err.message) - } - ) + error: err => this.notifier.error(err.message) + }) } async renewToken () { @@ -43,17 +41,15 @@ export class MyAccountApplicationsComponent implements OnInit { ) if (res === false) return - this.scopedTokensService.renewScopedTokens().subscribe( - tokens => { - this.regenApplications(tokens) - this.notifier.success($localize`Token renewed. Update your client configuration accordingly.`) - }, - - err => { - this.notifier.error(err.message) - } - ) + this.scopedTokensService.renewScopedTokens() + .subscribe({ + next: tokens => { + this.regenApplications(tokens) + this.notifier.success($localize`Token renewed. Update your client configuration accordingly.`) + }, + error: err => this.notifier.error(err.message) + }) } private regenApplications (tokens: ScopedToken) { -- cgit v1.2.3