diff options
Diffstat (limited to 'server/middlewares/validators/videos.ts')
-rw-r--r-- | server/middlewares/validators/videos.ts | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/server/middlewares/validators/videos.ts b/server/middlewares/validators/videos.ts index abb23b510..d9af2aa0a 100644 --- a/server/middlewares/validators/videos.ts +++ b/server/middlewares/validators/videos.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import 'express-validator' | 2 | import 'express-validator' |
3 | import { body, param, query, ValidationChain } from 'express-validator/check' | 3 | import { body, param, ValidationChain } from 'express-validator/check' |
4 | import { UserRight, VideoPrivacy } from '../../../shared' | 4 | import { UserRight, VideoPrivacy } from '../../../shared' |
5 | import { | 5 | import { |
6 | isBooleanValid, | 6 | isBooleanValid, |
@@ -172,18 +172,6 @@ const videosRemoveValidator = [ | |||
172 | } | 172 | } |
173 | ] | 173 | ] |
174 | 174 | ||
175 | const videosSearchValidator = [ | ||
176 | query('search').not().isEmpty().withMessage('Should have a valid search'), | ||
177 | |||
178 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | ||
179 | logger.debug('Checking videosSearch parameters', { parameters: req.params }) | ||
180 | |||
181 | if (areValidationErrors(req, res)) return | ||
182 | |||
183 | return next() | ||
184 | } | ||
185 | ] | ||
186 | |||
187 | const videoAbuseReportValidator = [ | 175 | const videoAbuseReportValidator = [ |
188 | param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'), | 176 | param('id').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid id'), |
189 | body('reason').custom(isVideoAbuseReasonValid).withMessage('Should have a valid reason'), | 177 | body('reason').custom(isVideoAbuseReasonValid).withMessage('Should have a valid reason'), |
@@ -240,7 +228,6 @@ export { | |||
240 | videosUpdateValidator, | 228 | videosUpdateValidator, |
241 | videosGetValidator, | 229 | videosGetValidator, |
242 | videosRemoveValidator, | 230 | videosRemoveValidator, |
243 | videosSearchValidator, | ||
244 | videosShareValidator, | 231 | videosShareValidator, |
245 | 232 | ||
246 | videoAbuseReportValidator, | 233 | videoAbuseReportValidator, |