From 8cac1b6446a97b16387c9590ce5c799a79a759fa Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 14 Feb 2018 17:16:32 +0100 Subject: Move adding a video view videojs peertube plugin --- client/src/app/shared/video/video.service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared/video/video.service.ts') diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts index d4f5e258f..01d32176b 100644 --- a/client/src/app/shared/video/video.service.ts +++ b/client/src/app/shared/video/video.service.ts @@ -29,6 +29,10 @@ export class VideoService { private restService: RestService ) {} + getVideoViewUrl (uuid: string) { + return VideoService.BASE_VIDEO_URL + uuid + '/views' + } + getVideo (uuid: string): Observable { return this.authHttp.get(VideoService.BASE_VIDEO_URL + uuid) .map(videoHash => new VideoDetails(videoHash)) @@ -36,7 +40,7 @@ export class VideoService { } viewVideo (uuid: string): Observable { - return this.authHttp.post(VideoService.BASE_VIDEO_URL + uuid + '/views', {}) + return this.authHttp.post(this.getVideoViewUrl(uuid), {}) .map(this.restExtractor.extractDataBool) .catch(this.restExtractor.handleError) } -- cgit v1.2.3