- .pipe(
- map(params => params[ 'accountId' ]),
- distinctUntilChanged(),
- switchMap(accountId => this.accountService.getAccount(accountId)),
- tap(account => {
- this.account = account
- this.getUserIfNeeded(account)
- }),
- switchMap(account => this.videoChannelService.listAccountVideoChannels(account)),
- catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 404 ]))
- )
- .subscribe(
- videoChannels => this.videoChannels = videoChannels.data,
-
- err => this.notifier.error(err.message)
- )
+ .pipe(
+ map(params => params['accountId']),
+ distinctUntilChanged(),
+ switchMap(accountId => this.accountService.getAccount(accountId)),
+ tap(account => this.onAccount(account)),
+ switchMap(account => this.videoChannelService.listAccountVideoChannels({ account })),
+ catchError(err => this.restExtractor.redirectTo404IfNotFound(err, 'other', [
+ HttpStatusCode.BAD_REQUEST_400,
+ HttpStatusCode.NOT_FOUND_404
+ ]))
+ )
+ .subscribe({
+ next: videoChannels => {
+ this.videoChannels = videoChannels.data
+ },
+
+ error: err => this.notifier.error(err.message)
+ })
+
+ this.links = [
+ { label: $localize`CHANNELS`, routerLink: 'video-channels' },
+ { label: $localize`VIDEOS`, routerLink: 'videos' }
+ ]