diff options
Diffstat (limited to 'server/middlewares/validators/videos.ts')
-rw-r--r-- | server/middlewares/validators/videos.ts | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/server/middlewares/validators/videos.ts b/server/middlewares/validators/videos.ts index c812d4677..203a00876 100644 --- a/server/middlewares/validators/videos.ts +++ b/server/middlewares/validators/videos.ts | |||
@@ -14,7 +14,6 @@ import { | |||
14 | import { | 14 | import { |
15 | checkUserCanManageVideo, | 15 | checkUserCanManageVideo, |
16 | isScheduleVideoUpdatePrivacyValid, | 16 | isScheduleVideoUpdatePrivacyValid, |
17 | isVideoAbuseReasonValid, | ||
18 | isVideoCategoryValid, | 17 | isVideoCategoryValid, |
19 | isVideoChannelOfAccountExist, | 18 | isVideoChannelOfAccountExist, |
20 | isVideoDescriptionValid, | 19 | isVideoDescriptionValid, |
@@ -174,20 +173,6 @@ const videosRemoveValidator = [ | |||
174 | } | 173 | } |
175 | ] | 174 | ] |
176 | 175 | ||
177 | const videoAbuseReportValidator = [ | ||
178 | param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'), | ||
179 | body('reason').custom(isVideoAbuseReasonValid).withMessage('Should have a valid reason'), | ||
180 | |||
181 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | ||
182 | logger.debug('Checking videoAbuseReport parameters', { parameters: req.body }) | ||
183 | |||
184 | if (areValidationErrors(req, res)) return | ||
185 | if (!await isVideoExist(req.params.id, res)) return | ||
186 | |||
187 | return next() | ||
188 | } | ||
189 | ] | ||
190 | |||
191 | const videoRateValidator = [ | 176 | const videoRateValidator = [ |
192 | param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'), | 177 | param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'), |
193 | body('rating').custom(isVideoRatingTypeValid).withMessage('Should have a valid rate type'), | 178 | body('rating').custom(isVideoRatingTypeValid).withMessage('Should have a valid rate type'), |
@@ -299,8 +284,6 @@ export { | |||
299 | videosRemoveValidator, | 284 | videosRemoveValidator, |
300 | videosShareValidator, | 285 | videosShareValidator, |
301 | 286 | ||
302 | videoAbuseReportValidator, | ||
303 | |||
304 | videoRateValidator, | 287 | videoRateValidator, |
305 | 288 | ||
306 | getCommonVideoAttributes | 289 | getCommonVideoAttributes |