diff options
Diffstat (limited to 'client/src/app/+accounts/accounts.component.ts')
-rw-r--r-- | client/src/app/+accounts/accounts.component.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts index 3118d7562..e3a503f4c 100644 --- a/client/src/app/+accounts/accounts.component.ts +++ b/client/src/app/+accounts/accounts.component.ts | |||
@@ -8,6 +8,8 @@ import { Subscription } from 'rxjs' | |||
8 | import { AuthService, Notifier, RedirectService } from '@app/core' | 8 | import { AuthService, Notifier, RedirectService } from '@app/core' |
9 | import { User, UserRight } from '../../../../shared' | 9 | import { User, UserRight } from '../../../../shared' |
10 | import { I18n } from '@ngx-translate/i18n-polyfill' | 10 | import { I18n } from '@ngx-translate/i18n-polyfill' |
11 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | ||
12 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | ||
11 | 13 | ||
12 | @Component({ | 14 | @Component({ |
13 | templateUrl: './accounts.component.html', | 15 | templateUrl: './accounts.component.html', |
@@ -16,6 +18,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill' | |||
16 | export class AccountsComponent implements OnInit, OnDestroy { | 18 | export class AccountsComponent implements OnInit, OnDestroy { |
17 | account: Account | 19 | account: Account |
18 | user: User | 20 | user: User |
21 | videoChannels: VideoChannel[] | ||
19 | 22 | ||
20 | private routeSub: Subscription | 23 | private routeSub: Subscription |
21 | 24 | ||
@@ -23,6 +26,7 @@ export class AccountsComponent implements OnInit, OnDestroy { | |||
23 | private route: ActivatedRoute, | 26 | private route: ActivatedRoute, |
24 | private userService: UserService, | 27 | private userService: UserService, |
25 | private accountService: AccountService, | 28 | private accountService: AccountService, |
29 | private videoChannelService: VideoChannelService, | ||
26 | private notifier: Notifier, | 30 | private notifier: Notifier, |
27 | private restExtractor: RestExtractor, | 31 | private restExtractor: RestExtractor, |
28 | private redirectService: RedirectService, | 32 | private redirectService: RedirectService, |
@@ -40,7 +44,11 @@ export class AccountsComponent implements OnInit, OnDestroy { | |||
40 | catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 404 ])) | 44 | catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 404 ])) |
41 | ) | 45 | ) |
42 | .subscribe( | 46 | .subscribe( |
43 | account => this.account = account, | 47 | account => { |
48 | this.account = account | ||
49 | this.videoChannelService.listAccountVideoChannels(account) | ||
50 | .subscribe(videoChannels => this.videoChannels = videoChannels.data) | ||
51 | }, | ||
44 | 52 | ||
45 | err => this.notifier.error(err.message) | 53 | err => this.notifier.error(err.message) |
46 | ) | 54 | ) |