aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-12 14:09:04 +0200
committerChocobozzz <me@florianbigard.com>2021-05-12 14:12:14 +0200
commit16c016e8b1d5ca46343d3363f9a49e24c5d7c944 (patch)
tree157dfa22ac95bd76a411aaf78e4df17152530e1c /server/controllers/api/videos/index.ts
parent9a320a06b663a2e02c3156a07135f75f9e987b11 (diff)
downloadPeerTube-16c016e8b1d5ca46343d3363f9a49e24c5d7c944.tar.gz
PeerTube-16c016e8b1d5ca46343d3363f9a49e24c5d7c944.tar.zst
PeerTube-16c016e8b1d5ca46343d3363f9a49e24c5d7c944.zip
Stricter models typing
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index c32626d30..f5ce15074 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -308,7 +308,7 @@ async function addVideo (options: {
308 if (videoInfo.scheduleUpdate) { 308 if (videoInfo.scheduleUpdate) {
309 await ScheduleVideoUpdateModel.create({ 309 await ScheduleVideoUpdateModel.create({
310 videoId: video.id, 310 videoId: video.id,
311 updateAt: videoInfo.scheduleUpdate.updateAt, 311 updateAt: new Date(videoInfo.scheduleUpdate.updateAt),
312 privacy: videoInfo.scheduleUpdate.privacy || null 312 privacy: videoInfo.scheduleUpdate.privacy || null
313 }, { transaction: t }) 313 }, { transaction: t })
314 } 314 }
@@ -435,7 +435,7 @@ async function updateVideo (req: express.Request, res: express.Response) {
435 if (videoInfoToUpdate.scheduleUpdate) { 435 if (videoInfoToUpdate.scheduleUpdate) {
436 await ScheduleVideoUpdateModel.upsert({ 436 await ScheduleVideoUpdateModel.upsert({
437 videoId: videoInstanceUpdated.id, 437 videoId: videoInstanceUpdated.id,
438 updateAt: videoInfoToUpdate.scheduleUpdate.updateAt, 438 updateAt: new Date(videoInfoToUpdate.scheduleUpdate.updateAt),
439 privacy: videoInfoToUpdate.scheduleUpdate.privacy || null 439 privacy: videoInfoToUpdate.scheduleUpdate.privacy || null
440 }, { transaction: t }) 440 }, { transaction: t })
441 } else if (videoInfoToUpdate.scheduleUpdate === null) { 441 } else if (videoInfoToUpdate.scheduleUpdate === null) {