) {}
listCaptions (videoId: number | string): Observable<ResultList<VideoCaption>> {
- return this.authHttp.get<ResultList<VideoCaption>>(VideoService.BASE_VIDEO_URL + videoId + '/captions')
+ return this.authHttp.get<ResultList<VideoCaption>>(`${VideoService.BASE_VIDEO_URL}/${videoId}/captions`)
.pipe(
switchMap(captionsResult => {
return this.serverService.getServerLocale()
}
removeCaption (videoId: number | string, language: string) {
- return this.authHttp.delete(VideoService.BASE_VIDEO_URL + videoId + '/captions/' + language)
+ return this.authHttp.delete(`${VideoService.BASE_VIDEO_URL}/${videoId}/captions/${language}`)
.pipe(
map(this.restExtractor.extractDataBool),
catchError(res => this.restExtractor.handleError(res))
const body = { captionfile }
const data = objectToFormData(body)
- return this.authHttp.put(VideoService.BASE_VIDEO_URL + videoId + '/captions/' + language, data)
+ return this.authHttp.put(`${VideoService.BASE_VIDEO_URL}/${videoId}/captions/${language}`, data)
.pipe(
map(this.restExtractor.extractDataBool),
catchError(res => this.restExtractor.handleError(res))