]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/video-caption/video-caption.service.ts
Display latest uploaded date for captions
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / video-caption / video-caption.service.ts
index 67eb09e4d5e7bcfcc3be9a575ab2ab16b66106ff..0f3afd116eb6dd11a84455aab045f009c0930947 100644 (file)
@@ -7,8 +7,8 @@ import { objectToFormData, sortBy } from '@app/helpers'
 import { VideoService } from '@app/shared/shared-main/video'
 import { peertubeTranslate } from '@shared/core-utils/i18n'
 import { ResultList, VideoCaption } from '@shared/models'
-import { VideoCaptionEdit } from './video-caption-edit.model'
 import { environment } from '../../../../environments/environment'
+import { VideoCaptionEdit } from './video-caption-edit.model'
 
 @Injectable()
 export class VideoCaptionService {
@@ -18,7 +18,7 @@ export class VideoCaptionService {
     private restExtractor: RestExtractor
   ) {}
 
-  listCaptions (videoId: number | string): Observable<ResultList<VideoCaption>> {
+  listCaptions (videoId: string): Observable<ResultList<VideoCaption>> {
     return this.authHttp.get<ResultList<VideoCaption>>(`${VideoService.BASE_VIDEO_URL}/${videoId}/captions`)
                .pipe(
                  switchMap(captionsResult => {
@@ -69,6 +69,6 @@ export class VideoCaptionService {
   }
 
   getCaptionContent ({ captionPath }: Pick<VideoCaption, 'captionPath'>) {
-    return this.authHttp.get(`${environment.originServerUrl}${captionPath}`, { responseType: 'text' })
+    return this.authHttp.get(environment.originServerUrl + captionPath, { responseType: 'text' })
   }
 }