1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Stricter models typing

This commit is contained in:
Chocobozzz 2021-05-12 14:09:04 +02:00
parent 9a320a06b6
commit 16c016e8b1
No known key found for this signature in database
GPG key ID: 583A612D890159BE
54 changed files with 148 additions and 95 deletions

View file

@ -308,7 +308,7 @@ async function addVideo (options: {
if (videoInfo.scheduleUpdate) {
await ScheduleVideoUpdateModel.create({
videoId: video.id,
updateAt: videoInfo.scheduleUpdate.updateAt,
updateAt: new Date(videoInfo.scheduleUpdate.updateAt),
privacy: videoInfo.scheduleUpdate.privacy || null
}, { transaction: t })
}
@ -435,7 +435,7 @@ async function updateVideo (req: express.Request, res: express.Response) {
if (videoInfoToUpdate.scheduleUpdate) {
await ScheduleVideoUpdateModel.upsert({
videoId: videoInstanceUpdated.id,
updateAt: videoInfoToUpdate.scheduleUpdate.updateAt,
updateAt: new Date(videoInfoToUpdate.scheduleUpdate.updateAt),
privacy: videoInfoToUpdate.scheduleUpdate.privacy || null
}, { transaction: t })
} else if (videoInfoToUpdate.scheduleUpdate === null) {