diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-24 14:47:32 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-24 14:47:32 +0200 |
commit | 7c07259ae5c7b636d52b8ec103a19d31c2f5b755 (patch) | |
tree | 30e85294a11ce8356dbcc31b0f9df91a18086306 /client/src/app/shared/shared-main | |
parent | 978489b64c7b329cbfde5ffd7fe806702a3490c7 (diff) | |
download | PeerTube-7c07259ae5c7b636d52b8ec103a19d31c2f5b755.tar.gz PeerTube-7c07259ae5c7b636d52b8ec103a19d31c2f5b755.tar.zst PeerTube-7c07259ae5c7b636d52b8ec103a19d31c2f5b755.zip |
Fix fetching unlisted video in client
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r-- | client/src/app/shared/shared-main/video-caption/video-caption.service.ts | 2 | ||||
-rw-r--r-- | client/src/app/shared/shared-main/video/video.service.ts | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/client/src/app/shared/shared-main/video-caption/video-caption.service.ts b/client/src/app/shared/shared-main/video-caption/video-caption.service.ts index 00ebe5bc6..0f3afd116 100644 --- a/client/src/app/shared/shared-main/video-caption/video-caption.service.ts +++ b/client/src/app/shared/shared-main/video-caption/video-caption.service.ts | |||
@@ -18,7 +18,7 @@ export class VideoCaptionService { | |||
18 | private restExtractor: RestExtractor | 18 | private restExtractor: RestExtractor |
19 | ) {} | 19 | ) {} |
20 | 20 | ||
21 | listCaptions (videoId: number | string): Observable<ResultList<VideoCaption>> { | 21 | listCaptions (videoId: string): Observable<ResultList<VideoCaption>> { |
22 | return this.authHttp.get<ResultList<VideoCaption>>(`${VideoService.BASE_VIDEO_URL}/${videoId}/captions`) | 22 | return this.authHttp.get<ResultList<VideoCaption>>(`${VideoService.BASE_VIDEO_URL}/${videoId}/captions`) |
23 | .pipe( | 23 | .pipe( |
24 | switchMap(captionsResult => { | 24 | switchMap(captionsResult => { |
diff --git a/client/src/app/shared/shared-main/video/video.service.ts b/client/src/app/shared/shared-main/video/video.service.ts index 83bc4eeb6..7810c4303 100644 --- a/client/src/app/shared/shared-main/video/video.service.ts +++ b/client/src/app/shared/shared-main/video/video.service.ts | |||
@@ -338,19 +338,19 @@ export class VideoService { | |||
338 | ) | 338 | ) |
339 | } | 339 | } |
340 | 340 | ||
341 | setVideoLike (id: number) { | 341 | setVideoLike (id: string) { |
342 | return this.setVideoRate(id, 'like') | 342 | return this.setVideoRate(id, 'like') |
343 | } | 343 | } |
344 | 344 | ||
345 | setVideoDislike (id: number) { | 345 | setVideoDislike (id: string) { |
346 | return this.setVideoRate(id, 'dislike') | 346 | return this.setVideoRate(id, 'dislike') |
347 | } | 347 | } |
348 | 348 | ||
349 | unsetVideoLike (id: number) { | 349 | unsetVideoLike (id: string) { |
350 | return this.setVideoRate(id, 'none') | 350 | return this.setVideoRate(id, 'none') |
351 | } | 351 | } |
352 | 352 | ||
353 | getUserVideoRating (id: number) { | 353 | getUserVideoRating (id: string) { |
354 | const url = UserService.BASE_USERS_URL + 'me/videos/' + id + '/rating' | 354 | const url = UserService.BASE_USERS_URL + 'me/videos/' + id + '/rating' |
355 | 355 | ||
356 | return this.authHttp.get<UserVideoRate>(url) | 356 | return this.authHttp.get<UserVideoRate>(url) |
@@ -466,7 +466,7 @@ export class VideoService { | |||
466 | } | 466 | } |
467 | } | 467 | } |
468 | 468 | ||
469 | private setVideoRate (id: number, rateType: UserVideoRateType) { | 469 | private setVideoRate (id: string, rateType: UserVideoRateType) { |
470 | const url = `${VideoService.BASE_VIDEO_URL}/${id}/rate` | 470 | const url = `${VideoService.BASE_VIDEO_URL}/${id}/rate` |
471 | const body: UserVideoRateUpdate = { | 471 | const body: UserVideoRateUpdate = { |
472 | rating: rateType | 472 | rating: rateType |