]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/model-loaders/video.ts
Reduce joins need to generate AP url
[github/Chocobozzz/PeerTube.git] / server / lib / model-loaders / video.ts
index e2bf96f6218e05b5ef65847d3e9454b4304b25d7..cef6a367c1c05e960cdeac0db4bd9a7a72facadd 100644 (file)
@@ -5,8 +5,7 @@ import {
   MVideoFullLight,
   MVideoId,
   MVideoImmutable,
-  MVideoThumbnail,
-  MVideoWithRights
+  MVideoThumbnail
 } from '@server/types/models'
 import { Hooks } from '../plugins/hooks'
 
@@ -36,7 +35,7 @@ function loadVideo (
     )
   }
 
-  if (fetchType === 'all') return VideoModel.loadAndPopulateAccountAndServerAndTags(id, undefined, userId)
+  if (fetchType === 'all') return VideoModel.loadFull(id, undefined, userId)
 
   if (fetchType === 'only-immutable-attributes') return VideoModel.loadImmutableAttributes(id)