diff options
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 = { |