diff options
Diffstat (limited to 'client/src/app/+video-channels/video-channels.component.ts')
-rw-r--r-- | client/src/app/+video-channels/video-channels.component.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts index ea8bda1cf..d2fd265c4 100644 --- a/client/src/app/+video-channels/video-channels.component.ts +++ b/client/src/app/+video-channels/video-channels.component.ts | |||
@@ -6,6 +6,7 @@ import { ActivatedRoute } from '@angular/router' | |||
6 | import { AuthService, Notifier, RestExtractor, ScreenService } from '@app/core' | 6 | import { AuthService, Notifier, RestExtractor, ScreenService } from '@app/core' |
7 | import { ListOverflowItem, VideoChannel, VideoChannelService } from '@app/shared/shared-main' | 7 | import { ListOverflowItem, VideoChannel, VideoChannelService } from '@app/shared/shared-main' |
8 | import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' | 8 | import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' |
9 | import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' | ||
9 | 10 | ||
10 | @Component({ | 11 | @Component({ |
11 | templateUrl: './video-channels.component.html', | 12 | templateUrl: './video-channels.component.html', |
@@ -37,7 +38,10 @@ export class VideoChannelsComponent implements OnInit, OnDestroy { | |||
37 | map(params => params[ 'videoChannelName' ]), | 38 | map(params => params[ 'videoChannelName' ]), |
38 | distinctUntilChanged(), | 39 | distinctUntilChanged(), |
39 | switchMap(videoChannelName => this.videoChannelService.getVideoChannel(videoChannelName)), | 40 | switchMap(videoChannelName => this.videoChannelService.getVideoChannel(videoChannelName)), |
40 | catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 404 ])) | 41 | catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ |
42 | HttpStatusCode.BAD_REQUEST_400, | ||
43 | HttpStatusCode.NOT_FOUND_404 | ||
44 | ])) | ||
41 | ) | 45 | ) |
42 | .subscribe(videoChannel => { | 46 | .subscribe(videoChannel => { |
43 | this.videoChannel = videoChannel | 47 | this.videoChannel = videoChannel |