// 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
}
private setRating (nextRating: UserVideoRateType) {
- const ratingMethods: { [id in UserVideoRateType]: (id: number) => Observable<any> } = {
+ const ratingMethods: { [id in UserVideoRateType]: (id: string) => Observable<any> } = {
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