aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
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