aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-applications
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-17 11:27:47 +0200
committerChocobozzz <me@florianbigard.com>2021-08-17 14:01:45 +0200
commit1378c0d343028f3d40d7d795422684ab9e6a1599 (patch)
tree08062b84a38a7e2dfe0aa674e7ca8e1b7321044e /client/src/app/+my-account/my-account-applications
parentc186a67f90203af6bfa434f026efdc99193bcd65 (diff)
downloadPeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.gz
PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.zst
PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.zip
Fix client lint
Diffstat (limited to 'client/src/app/+my-account/my-account-applications')
-rw-r--r--client/src/app/+my-account/my-account-applications/my-account-applications.component.ts30
1 files changed, 13 insertions, 17 deletions
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 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { AuthService, Notifier, ConfirmService, ScopedTokensService } from '@app/core' 2import { AuthService, ConfirmService, Notifier, ScopedTokensService } from '@app/core'
3import { VideoService } from '@app/shared/shared-main' 3import { VideoService } from '@app/shared/shared-main'
4import { FeedFormat } from '@shared/models' 4import { FeedFormat } from '@shared/models'
5import { ScopedToken } from '@shared/models/users/user-scoped-token' 5import { ScopedToken } from '@shared/models/users/user-scoped-token'
@@ -27,13 +27,11 @@ export class MyAccountApplicationsComponent implements OnInit {
27 ngOnInit () { 27 ngOnInit () {
28 this.feedUrl = this.baseURL 28 this.feedUrl = this.baseURL
29 this.scopedTokensService.getScopedTokens() 29 this.scopedTokensService.getScopedTokens()
30 .subscribe( 30 .subscribe({
31 tokens => this.regenApplications(tokens), 31 next: tokens => this.regenApplications(tokens),
32 32
33 err => { 33 error: err => this.notifier.error(err.message)
34 this.notifier.error(err.message) 34 })
35 }
36 )
37 } 35 }
38 36
39 async renewToken () { 37 async renewToken () {
@@ -43,17 +41,15 @@ export class MyAccountApplicationsComponent implements OnInit {
43 ) 41 )
44 if (res === false) return 42 if (res === false) return
45 43
46 this.scopedTokensService.renewScopedTokens().subscribe( 44 this.scopedTokensService.renewScopedTokens()
47 tokens => { 45 .subscribe({
48 this.regenApplications(tokens) 46 next: tokens => {
49 this.notifier.success($localize`Token renewed. Update your client configuration accordingly.`) 47 this.regenApplications(tokens)
50 }, 48 this.notifier.success($localize`Token renewed. Update your client configuration accordingly.`)
51 49 },
52 err => {
53 this.notifier.error(err.message)
54 }
55 )
56 50
51 error: err => this.notifier.error(err.message)
52 })
57 } 53 }
58 54
59 private regenApplications (tokens: ScopedToken) { 55 private regenApplications (tokens: ScopedToken) {