From db400f447a9f7aae1c56fa25396e93069744483f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 15 May 2018 11:55:51 +0200 Subject: Upgrade to rxjs 6 --- .../account-video-channels.component.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'client/src/app/+accounts/account-video-channels/account-video-channels.component.ts') 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 @@ import { Component, OnInit } from '@angular/core' import { ActivatedRoute } from '@angular/router' -import 'rxjs/add/observable/from' -import 'rxjs/add/operator/concatAll' import { Account } from '@app/shared/account/account.model' import { AccountService } from '@app/shared/account/account.service' import { VideoChannel } from '../../../../../shared/models/videos' import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' +import { flatMap, map, tap } from 'rxjs/operators' @Component({ selector: 'my-account-video-channels', @@ -25,9 +24,11 @@ export class AccountVideoChannelsComponent implements OnInit { ngOnInit () { // Parent get the account for us this.accountService.accountLoaded - .do(account => this.account = account) - .flatMap(account => this.videoChannelService.listAccountVideoChannels(account.id)) - .map(res => res.data) + .pipe( + tap(account => this.account = account), + flatMap(account => this.videoChannelService.listAccountVideoChannels(account.id)), + map(res => res.data) + ) .subscribe(videoChannels => this.videoChannels = videoChannels) } } -- cgit v1.2.3