aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-01 09:41:48 +0200
committerChocobozzz <me@florianbigard.com>2018-10-01 09:41:48 +0200
commit46f8d69b4e58a3006c32b2e0d97b9262fd30fd6b (patch)
tree8b06bd5f60d464723769fb53fe4f96558f3bfa74 /server/middlewares
parent8b917537af2217ad0c87d49fd2ffa693d46a499c (diff)
downloadPeerTube-46f8d69b4e58a3006c32b2e0d97b9262fd30fd6b.tar.gz
PeerTube-46f8d69b4e58a3006c32b2e0d97b9262fd30fd6b.tar.zst
PeerTube-46f8d69b4e58a3006c32b2e0d97b9262fd30fd6b.zip
Fix redundancy with videos already duplicated with another instance
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/validators/redundancy.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/middlewares/validators/redundancy.ts b/server/middlewares/validators/redundancy.ts
index d91b47574..c72ab78b2 100644
--- a/server/middlewares/validators/redundancy.ts
+++ b/server/middlewares/validators/redundancy.ts
@@ -37,7 +37,7 @@ const videoRedundancyGetValidator = [
37 if (!videoFile) return res.status(404).json({ error: 'Video file not found.' }) 37 if (!videoFile) return res.status(404).json({ error: 'Video file not found.' })
38 res.locals.videoFile = videoFile 38 res.locals.videoFile = videoFile
39 39
40 const videoRedundancy = await VideoRedundancyModel.loadByFileId(videoFile.id) 40 const videoRedundancy = await VideoRedundancyModel.loadLocalByFileId(videoFile.id)
41 if (!videoRedundancy)return res.status(404).json({ error: 'Video redundancy not found.' }) 41 if (!videoRedundancy)return res.status(404).json({ error: 'Video redundancy not found.' })
42 res.locals.videoRedundancy = videoRedundancy 42 res.locals.videoRedundancy = videoRedundancy
43 43