aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/middlewares/validators/redundancy.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/middlewares/validators/redundancy.ts b/server/middlewares/validators/redundancy.ts
index 6d2dd39c9..c379aebe4 100644
--- a/server/middlewares/validators/redundancy.ts
+++ b/server/middlewares/validators/redundancy.ts
@@ -130,8 +130,12 @@ const addVideoRedundancyValidator = [
130 130
131 if (res.locals.onlyVideo.remote === false) { 131 if (res.locals.onlyVideo.remote === false) {
132 return res.status(HttpStatusCode.BAD_REQUEST_400) 132 return res.status(HttpStatusCode.BAD_REQUEST_400)
133 .json({ error: 'Cannot create a redundancy on a local video' }) 133 .json({ error: 'Cannot create a redundancy on a local video' })
134 .end() 134 }
135
136 if (res.locals.onlyVideo.isLive) {
137 return res.status(HttpStatusCode.BAD_REQUEST_400)
138 .json({ error: 'Cannot create a redundancy of a live video' })
135 } 139 }
136 140
137 const alreadyExists = await VideoRedundancyModel.isLocalByVideoUUIDExists(res.locals.onlyVideo.uuid) 141 const alreadyExists = await VideoRedundancyModel.isLocalByVideoUUIDExists(res.locals.onlyVideo.uuid)