1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Fix removing scheduled update

This commit is contained in:
Chocobozzz 2018-06-18 10:24:53 +02:00
parent fc11a44ec9
commit e94fc29706
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 25 additions and 3 deletions

View file

@ -342,10 +342,12 @@ async function updateVideo (req: express.Request, res: express.Response) {
updateAt: videoInfoToUpdate.scheduleUpdate.updateAt,
privacy: videoInfoToUpdate.scheduleUpdate.privacy || null
}, { transaction: t })
} else if (videoInfoToUpdate.scheduleUpdate === null) {
await ScheduleVideoUpdateModel.deleteByVideoId(videoInstanceUpdated.id, t)
}
const isNewVideo = wasPrivateVideo && videoInstanceUpdated.privacy !== VideoPrivacy.PRIVATE
await federateVideoIfNeeded(videoInstanceUpdated, isNewVideo)
await federateVideoIfNeeded(videoInstanceUpdated, isNewVideo, t)
})
logger.info('Video with name %s and uuid %s updated.', videoInstance.name, videoInstance.uuid)