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:
parent
fc11a44ec9
commit
e94fc29706
5 changed files with 25 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue