diff options
author | Chocobozzz <me@florianbigard.com> | 2023-08-18 11:40:54 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-08-18 11:40:54 +0200 |
commit | 7ace48819edc63f19f28ba3eedbbfbaa7c6504bd (patch) | |
tree | bc0fcf2fc9e1da9184d7581de2cf063e83ab00d0 /server | |
parent | ca589b42f1159d4474d7803c02b0c90579316bd5 (diff) | |
download | PeerTube-7ace48819edc63f19f28ba3eedbbfbaa7c6504bd.tar.gz PeerTube-7ace48819edc63f19f28ba3eedbbfbaa7c6504bd.tar.zst PeerTube-7ace48819edc63f19f28ba3eedbbfbaa7c6504bd.zip |
Add ability to reset originallyPublishedAt
Diffstat (limited to 'server')
-rw-r--r-- | server/server/controllers/api/videos/update.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/server/controllers/api/videos/update.ts b/server/server/controllers/api/videos/update.ts index 1c8cecba1..491175d74 100644 --- a/server/server/controllers/api/videos/update.ts +++ b/server/server/controllers/api/videos/update.ts | |||
@@ -86,8 +86,10 @@ async function updateVideo (req: express.Request, res: express.Response) { | |||
86 | if (videoInfoToUpdate[key] !== undefined) video.set(key, videoInfoToUpdate[key]) | 86 | if (videoInfoToUpdate[key] !== undefined) video.set(key, videoInfoToUpdate[key]) |
87 | } | 87 | } |
88 | 88 | ||
89 | if (videoInfoToUpdate.originallyPublishedAt !== undefined && videoInfoToUpdate.originallyPublishedAt !== null) { | 89 | if (videoInfoToUpdate.originallyPublishedAt !== undefined) { |
90 | video.originallyPublishedAt = new Date(videoInfoToUpdate.originallyPublishedAt) | 90 | video.originallyPublishedAt = videoInfoToUpdate.originallyPublishedAt |
91 | ? new Date(videoInfoToUpdate.originallyPublishedAt) | ||
92 | : null | ||
91 | } | 93 | } |
92 | 94 | ||
93 | // Privacy update? | 95 | // Privacy update? |