aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/videos/rate.ts4
-rw-r--r--server/controllers/client.ts3
2 files changed, 2 insertions, 5 deletions
diff --git a/server/controllers/api/videos/rate.ts b/server/controllers/api/videos/rate.ts
index 354c3d8f9..727984506 100644
--- a/server/controllers/api/videos/rate.ts
+++ b/server/controllers/api/videos/rate.ts
@@ -19,7 +19,7 @@ import {
19 videoRateValidator, 19 videoRateValidator,
20 asyncMiddleware 20 asyncMiddleware
21} from '../../../middlewares' 21} from '../../../middlewares'
22import { UserVideoRateUpdate, VideoRateType } from '../../../../shared' 22import { UserVideoRateUpdate } from '../../../../shared'
23 23
24const rateVideoRouter = express.Router() 24const rateVideoRouter = express.Router()
25 25
@@ -73,7 +73,7 @@ async function rateVideo (req: express.Request, res: express.Response) {
73 if (rateType === 'none') { // Destroy previous rate 73 if (rateType === 'none') { // Destroy previous rate
74 await previousRate.destroy() 74 await previousRate.destroy()
75 } else { // Update previous rate 75 } else { // Update previous rate
76 previousRate.type = rateType as VideoRateType 76 previousRate.type = rateType
77 77
78 await previousRate.save() 78 await previousRate.save()
79 } 79 }
diff --git a/server/controllers/client.ts b/server/controllers/client.ts
index 2071b5f01..67ebfcf1d 100644
--- a/server/controllers/client.ts
+++ b/server/controllers/client.ts
@@ -122,9 +122,6 @@ async function generateWatchHtmlPage (req: express.Request, res: express.Respons
122 videoPromise 122 videoPromise
123 ]) 123 ])
124 124
125 file = file as Buffer
126 video = video as VideoInstance
127
128 const html = file.toString() 125 const html = file.toString()
129 126
130 // Let Angular application handle errors 127 // Let Angular application handle errors