aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/videos.ts')
-rw-r--r--server/middlewares/validators/videos.ts15
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 @@
1import * as express from 'express' 1import * as express from 'express'
2import 'express-validator' 2import 'express-validator'
3import { body, param, query, ValidationChain } from 'express-validator/check' 3import { body, param, ValidationChain } from 'express-validator/check'
4import { UserRight, VideoPrivacy } from '../../../shared' 4import { UserRight, VideoPrivacy } from '../../../shared'
5import { 5import {
6 isBooleanValid, 6 isBooleanValid,
@@ -172,18 +172,6 @@ const videosRemoveValidator = [
172 } 172 }
173] 173]
174 174
175const 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
187const videoAbuseReportValidator = [ 175const 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,