X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bvideos%2F%2Bvideo-watch%2Fshared%2Faction-buttons%2Fvideo-rate.component.ts;h=0fef246b372f11fb5c9b4a2f653dd18b18d0d647;hb=7c07259ae5c7b636d52b8ec103a19d31c2f5b755;hp=48d48f33f41320f6b247a46b107b4be8f766b74d;hpb=978489b64c7b329cbfde5ffd7fe806702a3490c7;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts b/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts index 48d48f33f..0fef246b3 100644 --- a/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts +++ b/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts @@ -89,7 +89,7 @@ export class VideoRateComponent implements OnInit, OnChanges, OnDestroy { // Unlogged users do not have ratings if (this.isUserLoggedIn === false) return - this.videoService.getUserVideoRating(this.video.id) + this.videoService.getUserVideoRating(this.video.uuid) .subscribe({ next: ratingObject => { if (!ratingObject) return @@ -103,13 +103,13 @@ export class VideoRateComponent implements OnInit, OnChanges, OnDestroy { } private setRating (nextRating: UserVideoRateType) { - const ratingMethods: { [id in UserVideoRateType]: (id: number) => Observable } = { + const ratingMethods: { [id in UserVideoRateType]: (id: string) => Observable } = { like: this.videoService.setVideoLike, dislike: this.videoService.setVideoDislike, none: this.videoService.unsetVideoLike } - ratingMethods[nextRating].call(this.videoService, this.video.id) + ratingMethods[nextRating].call(this.videoService, this.video.uuid) .subscribe({ next: () => { // Update the video like attribute