]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/redundancy.ts
Fix redundancy with videos already duplicated with another instance
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / redundancy.ts
index d91b475743c3576ab0f3050640fa1a6850c52a40..c72ab78b23fa2c253a83956a51ae4e8e6d37b89b 100644 (file)
@@ -37,7 +37,7 @@ const videoRedundancyGetValidator = [
     if (!videoFile) return res.status(404).json({ error: 'Video file not found.' })
     res.locals.videoFile = videoFile
 
-    const videoRedundancy = await VideoRedundancyModel.loadByFileId(videoFile.id)
+    const videoRedundancy = await VideoRedundancyModel.loadLocalByFileId(videoFile.id)
     if (!videoRedundancy)return res.status(404).json({ error: 'Video redundancy not found.' })
     res.locals.videoRedundancy = videoRedundancy