diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-10 14:34:02 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-10 14:34:02 +0100 |
commit | 5cf027bdc46f1bf214c4cf26eee17ebda228004f (patch) | |
tree | 69695db464f3b775ddd5dd91dec71ac83f7b3b7b /server/controllers/api | |
parent | d78b51aa4ed74bd2e6598b771fcff6391d7d9a3e (diff) | |
download | PeerTube-5cf027bdc46f1bf214c4cf26eee17ebda228004f.tar.gz PeerTube-5cf027bdc46f1bf214c4cf26eee17ebda228004f.tar.zst PeerTube-5cf027bdc46f1bf214c4cf26eee17ebda228004f.zip |
Force video updatedAt update on update
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/videos/update.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/controllers/api/videos/update.ts b/server/controllers/api/videos/update.ts index a98a3e67c..07f9690ec 100644 --- a/server/controllers/api/videos/update.ts +++ b/server/controllers/api/videos/update.ts | |||
@@ -99,6 +99,11 @@ export async function updateVideo (req: express.Request, res: express.Response) | |||
99 | isNewVideo = await updateVideoPrivacy({ videoInstance, videoInfoToUpdate, hadPrivacyForFederation, transaction: t }) | 99 | isNewVideo = await updateVideoPrivacy({ videoInstance, videoInfoToUpdate, hadPrivacyForFederation, transaction: t }) |
100 | } | 100 | } |
101 | 101 | ||
102 | // Force updatedAt attribute change | ||
103 | if (!videoInstance.changed()) { | ||
104 | await videoInstance.setAsRefreshed() | ||
105 | } | ||
106 | |||
102 | const videoInstanceUpdated = await videoInstance.save(sequelizeOptions) as MVideoFullLight | 107 | const videoInstanceUpdated = await videoInstance.save(sequelizeOptions) as MVideoFullLight |
103 | 108 | ||
104 | // Thumbnail & preview updates? | 109 | // Thumbnail & preview updates? |