aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-31 16:31:24 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-10-31 16:31:24 +0100
commit53abc4c272be9ecc951274458d054dbaf86e594d (patch)
tree5d69eca59cf3b51c95ecad190f8cdb058ab9e3f7 /server/controllers
parent604e02abcba0a50be23f243db30eca94b68cd35f (diff)
downloadPeerTube-53abc4c272be9ecc951274458d054dbaf86e594d.tar.gz
PeerTube-53abc4c272be9ecc951274458d054dbaf86e594d.tar.zst
PeerTube-53abc4c272be9ecc951274458d054dbaf86e594d.zip
Upgrade server packages
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