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:
parent
9a320a06b6
commit
16c016e8b1
54 changed files with 148 additions and 95 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue