diff options
Diffstat (limited to 'server/middlewares/validators/videos/video-blacklist.ts')
-rw-r--r-- | server/middlewares/validators/videos/video-blacklist.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/server/middlewares/validators/videos/video-blacklist.ts b/server/middlewares/validators/videos/video-blacklist.ts index 77ad29cbb..db318dcdb 100644 --- a/server/middlewares/validators/videos/video-blacklist.ts +++ b/server/middlewares/validators/videos/video-blacklist.ts | |||
@@ -5,7 +5,6 @@ import { doesVideoExist } from '../../../helpers/custom-validators/videos' | |||
5 | import { logger } from '../../../helpers/logger' | 5 | import { logger } from '../../../helpers/logger' |
6 | import { areValidationErrors } from '../utils' | 6 | import { areValidationErrors } from '../utils' |
7 | import { doesVideoBlacklistExist, isVideoBlacklistReasonValid } from '../../../helpers/custom-validators/video-blacklist' | 7 | import { doesVideoBlacklistExist, isVideoBlacklistReasonValid } from '../../../helpers/custom-validators/video-blacklist' |
8 | import { VideoModel } from '../../../models/video/video' | ||
9 | 8 | ||
10 | const videosBlacklistRemoveValidator = [ | 9 | const videosBlacklistRemoveValidator = [ |
11 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid videoId'), | 10 | param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid videoId'), |
@@ -37,7 +36,7 @@ const videosBlacklistAddValidator = [ | |||
37 | if (areValidationErrors(req, res)) return | 36 | if (areValidationErrors(req, res)) return |
38 | if (!await doesVideoExist(req.params.videoId, res)) return | 37 | if (!await doesVideoExist(req.params.videoId, res)) return |
39 | 38 | ||
40 | const video: VideoModel = res.locals.video | 39 | const video = res.locals.video |
41 | if (req.body.unfederate === true && video.remote === true) { | 40 | if (req.body.unfederate === true && video.remote === true) { |
42 | return res | 41 | return res |
43 | .status(409) | 42 | .status(409) |