diff options
Diffstat (limited to 'client/src/app/+videos/+video-watch/shared/action-buttons')
-rw-r--r-- | client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts | 16 |
1 files changed, 8 insertions, 8 deletions
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 ecb5a9281..48d48f33f 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 | |||
@@ -90,16 +90,16 @@ export class VideoRateComponent implements OnInit, OnChanges, OnDestroy { | |||
90 | if (this.isUserLoggedIn === false) return | 90 | if (this.isUserLoggedIn === false) return |
91 | 91 | ||
92 | this.videoService.getUserVideoRating(this.video.id) | 92 | this.videoService.getUserVideoRating(this.video.id) |
93 | .subscribe( | 93 | .subscribe({ |
94 | ratingObject => { | 94 | next: ratingObject => { |
95 | if (!ratingObject) return | 95 | if (!ratingObject) return |
96 | 96 | ||
97 | this.userRating = ratingObject.rating | 97 | this.userRating = ratingObject.rating |
98 | this.userRatingLoaded.emit(this.userRating) | 98 | this.userRatingLoaded.emit(this.userRating) |
99 | }, | 99 | }, |
100 | 100 | ||
101 | err => this.notifier.error(err.message) | 101 | error: err => this.notifier.error(err.message) |
102 | ) | 102 | }) |
103 | } | 103 | } |
104 | 104 | ||
105 | private setRating (nextRating: UserVideoRateType) { | 105 | private setRating (nextRating: UserVideoRateType) { |
@@ -110,16 +110,16 @@ export class VideoRateComponent implements OnInit, OnChanges, OnDestroy { | |||
110 | } | 110 | } |
111 | 111 | ||
112 | ratingMethods[nextRating].call(this.videoService, this.video.id) | 112 | ratingMethods[nextRating].call(this.videoService, this.video.id) |
113 | .subscribe( | 113 | .subscribe({ |
114 | () => { | 114 | next: () => { |
115 | // Update the video like attribute | 115 | // Update the video like attribute |
116 | this.updateVideoRating(this.userRating, nextRating) | 116 | this.updateVideoRating(this.userRating, nextRating) |
117 | this.userRating = nextRating | 117 | this.userRating = nextRating |
118 | this.rateUpdated.emit(this.userRating) | 118 | this.rateUpdated.emit(this.userRating) |
119 | }, | 119 | }, |
120 | 120 | ||
121 | (err: { message: string }) => this.notifier.error(err.message) | 121 | error: err => this.notifier.error(err.message) |
122 | ) | 122 | }) |
123 | } | 123 | } |
124 | 124 | ||
125 | private updateVideoRating (oldRating: UserVideoRateType, newRating: UserVideoRateType) { | 125 | private updateVideoRating (oldRating: UserVideoRateType, newRating: UserVideoRateType) { |