diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-30 09:21:11 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-30 09:21:11 +0100 |
commit | 1f3e9feca2caf68024168b0ea9ed39d8438fa235 (patch) | |
tree | b77b02d11796cf435496fd22b85c430a7ed2479f /client/src/app/videos/shared | |
parent | 86d13ec2aa94ec10810ddf9c8b33314bd4968791 (diff) | |
download | PeerTube-1f3e9feca2caf68024168b0ea9ed39d8438fa235.tar.gz PeerTube-1f3e9feca2caf68024168b0ea9ed39d8438fa235.tar.zst PeerTube-1f3e9feca2caf68024168b0ea9ed39d8438fa235.zip |
Better view counter
Diffstat (limited to 'client/src/app/videos/shared')
-rw-r--r-- | client/src/app/videos/shared/video.service.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/client/src/app/videos/shared/video.service.ts b/client/src/app/videos/shared/video.service.ts index b1ab5f8b9..5d25a26d4 100644 --- a/client/src/app/videos/shared/video.service.ts +++ b/client/src/app/videos/shared/video.service.ts | |||
@@ -41,6 +41,12 @@ export class VideoService { | |||
41 | .catch((res) => this.restExtractor.handleError(res)) | 41 | .catch((res) => this.restExtractor.handleError(res)) |
42 | } | 42 | } |
43 | 43 | ||
44 | viewVideo (uuid: string): Observable<VideoDetails> { | ||
45 | return this.authHttp.post(VideoService.BASE_VIDEO_URL + uuid + '/views', {}) | ||
46 | .map(this.restExtractor.extractDataBool) | ||
47 | .catch(this.restExtractor.handleError) | ||
48 | } | ||
49 | |||
44 | updateVideo (video: VideoEdit) { | 50 | updateVideo (video: VideoEdit) { |
45 | const language = video.language ? video.language : null | 51 | const language = video.language ? video.language : null |
46 | 52 | ||