aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos/video-blacklist.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/videos/video-blacklist.ts')
-rw-r--r--server/middlewares/validators/videos/video-blacklist.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/middlewares/validators/videos/video-blacklist.ts b/server/middlewares/validators/videos/video-blacklist.ts
index 808fefc25..88c788a43 100644
--- a/server/middlewares/validators/videos/video-blacklist.ts
+++ b/server/middlewares/validators/videos/video-blacklist.ts
@@ -5,6 +5,7 @@ import { isVideoBlacklistReasonValid, isVideoBlacklistTypeValid } from '../../..
5import { logger } from '../../../helpers/logger' 5import { logger } from '../../../helpers/logger'
6import { doesVideoBlacklistExist, doesVideoExist } from '../../../helpers/middlewares' 6import { doesVideoBlacklistExist, doesVideoExist } from '../../../helpers/middlewares'
7import { areValidationErrors } from '../utils' 7import { areValidationErrors } from '../utils'
8import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
8 9
9const videosBlacklistRemoveValidator = [ 10const videosBlacklistRemoveValidator = [
10 param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid videoId'), 11 param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid videoId'),
@@ -39,7 +40,7 @@ const videosBlacklistAddValidator = [
39 const video = res.locals.videoAll 40 const video = res.locals.videoAll
40 if (req.body.unfederate === true && video.remote === true) { 41 if (req.body.unfederate === true && video.remote === true) {
41 return res 42 return res
42 .status(409) 43 .status(HttpStatusCode.CONFLICT_409)
43 .send({ error: 'You cannot unfederate a remote video.' }) 44 .send({ error: 'You cannot unfederate a remote video.' })
44 .end() 45 .end()
45 } 46 }