diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-15 11:55:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-16 09:42:54 +0200 |
commit | db400f447a9f7aae1c56fa25396e93069744483f (patch) | |
tree | f45af832a5d3f4eebafd2f885b7413d9f84fa374 /client/src/app/+accounts/account-video-channels | |
parent | 54c3a22faa04bf13eea37f39be9149fc5eb95737 (diff) | |
download | PeerTube-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.ts | 11 |
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 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { ActivatedRoute } from '@angular/router' | 2 | import { ActivatedRoute } from '@angular/router' |
3 | import 'rxjs/add/observable/from' | ||
4 | import 'rxjs/add/operator/concatAll' | ||
5 | import { Account } from '@app/shared/account/account.model' | 3 | import { Account } from '@app/shared/account/account.model' |
6 | import { AccountService } from '@app/shared/account/account.service' | 4 | import { AccountService } from '@app/shared/account/account.service' |
7 | import { VideoChannel } from '../../../../../shared/models/videos' | 5 | import { VideoChannel } from '../../../../../shared/models/videos' |
8 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | 6 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' |
7 | import { 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 | } |