]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/update.ts
Rename video full loading
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / update.ts
index 2cf8a5883ecf25e0dbf6e34d8295ca8bd335665d..65a7321fd22d5c9e0ee192f55585633bd20496ea 100644 (file)
@@ -62,7 +62,7 @@ async function updateVideo (req: express.Request, res: express.Response) {
   try {
     const { videoInstanceUpdated, isNewVideo } = await sequelizeTypescript.transaction(async t => {
       // Refresh video since thumbnails to prevent concurrent updates
-      const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoFromReq.id, t)
+      const video = await VideoModel.loadFull(videoFromReq.id, t)
 
       const sequelizeOptions = { transaction: t }
       const oldVideoChannel = video.VideoChannel
@@ -212,5 +212,5 @@ async function updateTorrentsMetadataIfNeeded (video: MVideoFullLight, videoInfo
   }
 
   // Refresh video since files have changed
-  return VideoModel.loadAndPopulateAccountAndServerAndTags(video.id)
+  return VideoModel.loadFull(video.id)
 }