aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/videos/rate.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/videos/rate.ts b/server/controllers/api/videos/rate.ts
index 520932c63..84f42633e 100644
--- a/server/controllers/api/videos/rate.ts
+++ b/server/controllers/api/videos/rate.ts
@@ -37,6 +37,9 @@ async function rateVideo (req: express.Request, res: express.Response) {
37 const accountInstance = await AccountModel.load(userAccount.id, t) 37 const accountInstance = await AccountModel.load(userAccount.id, t)
38 const previousRate = await AccountVideoRateModel.load(accountInstance.id, videoInstance.id, t) 38 const previousRate = await AccountVideoRateModel.load(accountInstance.id, videoInstance.id, t)
39 39
40 // Same rate, nothing do to
41 if (rateType === 'none' && !previousRate || previousRate?.type === rateType) return
42
40 let likesToIncrement = 0 43 let likesToIncrement = 0
41 let dislikesToIncrement = 0 44 let dislikesToIncrement = 0
42 45