UserService
} from '../../shared'
import { Video } from './video.model'
+import { VideoDetails } from './video-details.model'
+import { VideoEdit } from './video-edit.model'
import { VideoPagination } from './video-pagination.model'
import {
UserVideoRate,
VideoAbuseCreate,
UserVideoRateUpdate,
Video as VideoServerModel,
+ VideoDetails as VideoDetailsServerModel,
ResultList
} from '../../../../../shared'
private restService: RestService
) {}
- getVideo (uuid: string) {
- return this.authHttp.get<VideoServerModel>(VideoService.BASE_VIDEO_URL + uuid)
- .map(videoHash => new Video(videoHash))
+ getVideo (uuid: string): Observable<VideoDetails> {
+ return this.authHttp.get<VideoDetailsServerModel>(VideoService.BASE_VIDEO_URL + uuid)
+ .map(videoHash => new VideoDetails(videoHash))
.catch((res) => this.restExtractor.handleError(res))
}
- updateVideo (video: Video) {
+ updateVideo (video: VideoEdit) {
const language = video.language ? video.language : null
const body: VideoUpdate = {