diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-17 11:27:47 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-17 14:01:45 +0200 |
commit | 1378c0d343028f3d40d7d795422684ab9e6a1599 (patch) | |
tree | 08062b84a38a7e2dfe0aa674e7ca8e1b7321044e /client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts | |
parent | c186a67f90203af6bfa434f026efdc99193bcd65 (diff) | |
download | PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.gz PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.zst PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.zip |
Fix client lint
Diffstat (limited to 'client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts')
-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) { |