aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-applications
diff options
context:
space:
mode:
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) {