aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/shared/video.service.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-25 16:43:19 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-10-26 09:11:38 +0200
commit404b54e14f6623c1644a8c87ca22f4bab98d5484 (patch)
tree5fbe6cb637f35abae08e4c98a537447cbf4607d6 /client/src/app/videos/shared/video.service.ts
parentf5028693a896a3076dd286ac0030e3d8f78f5ebf (diff)
downloadPeerTube-404b54e14f6623c1644a8c87ca22f4bab98d5484.tar.gz
PeerTube-404b54e14f6623c1644a8c87ca22f4bab98d5484.tar.zst
PeerTube-404b54e14f6623c1644a8c87ca22f4bab98d5484.zip
Adapt client with video channels
Diffstat (limited to 'client/src/app/videos/shared/video.service.ts')
-rw-r--r--client/src/app/videos/shared/video.service.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/client/src/app/videos/shared/video.service.ts b/client/src/app/videos/shared/video.service.ts
index fc552f2b5..06fb3313e 100644
--- a/client/src/app/videos/shared/video.service.ts
+++ b/client/src/app/videos/shared/video.service.ts
@@ -12,6 +12,8 @@ import {
12 UserService 12 UserService
13} from '../../shared' 13} from '../../shared'
14import { Video } from './video.model' 14import { Video } from './video.model'
15import { VideoDetails } from './video-details.model'
16import { VideoEdit } from './video-edit.model'
15import { VideoPagination } from './video-pagination.model' 17import { VideoPagination } from './video-pagination.model'
16import { 18import {
17 UserVideoRate, 19 UserVideoRate,
@@ -20,6 +22,7 @@ import {
20 VideoAbuseCreate, 22 VideoAbuseCreate,
21 UserVideoRateUpdate, 23 UserVideoRateUpdate,
22 Video as VideoServerModel, 24 Video as VideoServerModel,
25 VideoDetails as VideoDetailsServerModel,
23 ResultList 26 ResultList
24} from '../../../../../shared' 27} from '../../../../../shared'
25 28
@@ -34,12 +37,12 @@ export class VideoService {
34 ) {} 37 ) {}
35 38
36 getVideo (uuid: string) { 39 getVideo (uuid: string) {
37 return this.authHttp.get<VideoServerModel>(VideoService.BASE_VIDEO_URL + uuid) 40 return this.authHttp.get<VideoDetailsServerModel>(VideoService.BASE_VIDEO_URL + uuid)
38 .map(videoHash => new Video(videoHash)) 41 .map(videoHash => new VideoDetails(videoHash))
39 .catch((res) => this.restExtractor.handleError(res)) 42 .catch((res) => this.restExtractor.handleError(res))
40 } 43 }
41 44
42 updateVideo (video: Video) { 45 updateVideo (video: VideoEdit) {
43 const language = video.language ? video.language : null 46 const language = video.language ? video.language : null
44 47
45 const body: VideoUpdate = { 48 const body: VideoUpdate = {