Add ability to reset originallyPublishedAt

This commit is contained in:
Chocobozzz
2023-08-18 11:40:54 +02:00
parent ca589b42f1
commit 7ace48819e
8 changed files with 60 additions and 48 deletions

View File

@@ -86,8 +86,10 @@ async function updateVideo (req: express.Request, res: express.Response) {
if (videoInfoToUpdate[key] !== undefined) video.set(key, videoInfoToUpdate[key])
}
if (videoInfoToUpdate.originallyPublishedAt !== undefined && videoInfoToUpdate.originallyPublishedAt !== null) {
video.originallyPublishedAt = new Date(videoInfoToUpdate.originallyPublishedAt)
if (videoInfoToUpdate.originallyPublishedAt !== undefined) {
video.originallyPublishedAt = videoInfoToUpdate.originallyPublishedAt
? new Date(videoInfoToUpdate.originallyPublishedAt)
: null
}
// Privacy update?