aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+accounts/account-video-channels
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-15 11:55:51 +0200
committerChocobozzz <me@florianbigard.com>2018-05-16 09:42:54 +0200
commitdb400f447a9f7aae1c56fa25396e93069744483f (patch)
treef45af832a5d3f4eebafd2f885b7413d9f84fa374 /client/src/app/+accounts/account-video-channels
parent54c3a22faa04bf13eea37f39be9149fc5eb95737 (diff)
downloadPeerTube-db400f447a9f7aae1c56fa25396e93069744483f.tar.gz
PeerTube-db400f447a9f7aae1c56fa25396e93069744483f.tar.zst
PeerTube-db400f447a9f7aae1c56fa25396e93069744483f.zip
Upgrade to rxjs 6
Diffstat (limited to 'client/src/app/+accounts/account-video-channels')
-rw-r--r--client/src/app/+accounts/account-video-channels/account-video-channels.component.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
index 4c5782f9d..0852c4bb7 100644
--- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
+++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
@@ -1,11 +1,10 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { ActivatedRoute } from '@angular/router' 2import { ActivatedRoute } from '@angular/router'
3import 'rxjs/add/observable/from'
4import 'rxjs/add/operator/concatAll'
5import { Account } from '@app/shared/account/account.model' 3import { Account } from '@app/shared/account/account.model'
6import { AccountService } from '@app/shared/account/account.service' 4import { AccountService } from '@app/shared/account/account.service'
7import { VideoChannel } from '../../../../../shared/models/videos' 5import { VideoChannel } from '../../../../../shared/models/videos'
8import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' 6import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
7import { flatMap, map, tap } from 'rxjs/operators'
9 8
10@Component({ 9@Component({
11 selector: 'my-account-video-channels', 10 selector: 'my-account-video-channels',
@@ -25,9 +24,11 @@ export class AccountVideoChannelsComponent implements OnInit {
25 ngOnInit () { 24 ngOnInit () {
26 // Parent get the account for us 25 // Parent get the account for us
27 this.accountService.accountLoaded 26 this.accountService.accountLoaded
28 .do(account => this.account = account) 27 .pipe(
29 .flatMap(account => this.videoChannelService.listAccountVideoChannels(account.id)) 28 tap(account => this.account = account),
30 .map(res => res.data) 29 flatMap(account => this.videoChannelService.listAccountVideoChannels(account.id)),
30 map(res => res.data)
31 )
31 .subscribe(videoChannels => this.videoChannels = videoChannels) 32 .subscribe(videoChannels => this.videoChannels = videoChannels)
32 } 33 }
33} 34}