import { AuthService, Notifier, RedirectService } from '@app/core'
import { User, UserRight } from '../../../../shared'
import { I18n } from '@ngx-translate/i18n-polyfill'
+import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
+import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
@Component({
templateUrl: './accounts.component.html',
export class AccountsComponent implements OnInit, OnDestroy {
account: Account
user: User
+ videoChannels: VideoChannel[]
private routeSub: Subscription
private route: ActivatedRoute,
private userService: UserService,
private accountService: AccountService,
+ private videoChannelService: VideoChannelService,
private notifier: Notifier,
private restExtractor: RestExtractor,
private redirectService: RedirectService,
catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 404 ]))
)
.subscribe(
- account => this.account = account,
+ account => {
+ this.account = account
+ this.videoChannelService.listAccountVideoChannels(account)
+ .subscribe(videoChannels => this.videoChannels = videoChannels.data)
+ },
err => this.notifier.error(err.message)
)