aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-18 11:28:17 +0200
committerChocobozzz <me@florianbigard.com>2019-04-24 16:26:20 +0200
commit1735c825726edaa0af5035cb6cbb0cc0db502c6d (patch)
tree7bbb442f2cb4d7be58a4e08d87f5974403a3047c /server/controllers/api/videos/index.ts
parente8bafea35bc930cb8ac5b2d521a188642a1adffe (diff)
downloadPeerTube-1735c825726edaa0af5035cb6cbb0cc0db502c6d.tar.gz
PeerTube-1735c825726edaa0af5035cb6cbb0cc0db502c6d.tar.zst
PeerTube-1735c825726edaa0af5035cb6cbb0cc0db502c6d.zip
Update sequelize
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 24721a17f..ad2fe958c 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -332,15 +332,15 @@ async function updateVideo (req: express.Request, res: express.Response) {
332 if (videoInfoToUpdate.downloadEnabled !== undefined) videoInstance.set('downloadEnabled', videoInfoToUpdate.downloadEnabled) 332 if (videoInfoToUpdate.downloadEnabled !== undefined) videoInstance.set('downloadEnabled', videoInfoToUpdate.downloadEnabled)
333 333
334 if (videoInfoToUpdate.originallyPublishedAt !== undefined && videoInfoToUpdate.originallyPublishedAt !== null) { 334 if (videoInfoToUpdate.originallyPublishedAt !== undefined && videoInfoToUpdate.originallyPublishedAt !== null) {
335 videoInstance.set('originallyPublishedAt', videoInfoToUpdate.originallyPublishedAt) 335 videoInstance.originallyPublishedAt = new Date(videoInfoToUpdate.originallyPublishedAt)
336 } 336 }
337 337
338 if (videoInfoToUpdate.privacy !== undefined) { 338 if (videoInfoToUpdate.privacy !== undefined) {
339 const newPrivacy = parseInt(videoInfoToUpdate.privacy.toString(), 10) 339 const newPrivacy = parseInt(videoInfoToUpdate.privacy.toString(), 10)
340 videoInstance.set('privacy', newPrivacy) 340 videoInstance.privacy = newPrivacy
341 341
342 if (wasPrivateVideo === true && newPrivacy !== VideoPrivacy.PRIVATE) { 342 if (wasPrivateVideo === true && newPrivacy !== VideoPrivacy.PRIVATE) {
343 videoInstance.set('publishedAt', new Date()) 343 videoInstance.publishedAt = new Date()
344 } 344 }
345 } 345 }
346 346