diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-10-25 16:43:19 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-10-26 09:11:38 +0200 |
commit | 404b54e14f6623c1644a8c87ca22f4bab98d5484 (patch) | |
tree | 5fbe6cb637f35abae08e4c98a537447cbf4607d6 /client/src/app/videos/shared/video.service.ts | |
parent | f5028693a896a3076dd286ac0030e3d8f78f5ebf (diff) | |
download | PeerTube-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.ts | 9 |
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' |
14 | import { Video } from './video.model' | 14 | import { Video } from './video.model' |
15 | import { VideoDetails } from './video-details.model' | ||
16 | import { VideoEdit } from './video-edit.model' | ||
15 | import { VideoPagination } from './video-pagination.model' | 17 | import { VideoPagination } from './video-pagination.model' |
16 | import { | 18 | import { |
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 = { |