aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/videos')
-rw-r--r--server/middlewares/validators/videos/video-comments.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/middlewares/validators/videos/video-comments.ts b/server/middlewares/validators/videos/video-comments.ts
index 55fb60b98..a3c9febc4 100644
--- a/server/middlewares/validators/videos/video-comments.ts
+++ b/server/middlewares/validators/videos/video-comments.ts
@@ -2,7 +2,7 @@ import * as express from 'express'
2import { body, param, query } from 'express-validator' 2import { body, param, query } from 'express-validator'
3import { MUserAccountUrl } from '@server/types/models' 3import { MUserAccountUrl } from '@server/types/models'
4import { UserRight } from '../../../../shared' 4import { UserRight } from '../../../../shared'
5import { exists, isBooleanValid, isIdOrUUIDValid, isIdValid } from '../../../helpers/custom-validators/misc' 5import { exists, isBooleanValid, isIdOrUUIDValid, isIdValid, toBooleanOrNull } from '../../../helpers/custom-validators/misc'
6import { 6import {
7 doesVideoCommentExist, 7 doesVideoCommentExist,
8 doesVideoCommentThreadExist, 8 doesVideoCommentThreadExist,
@@ -18,6 +18,7 @@ import { areValidationErrors } from '../utils'
18const listVideoCommentsValidator = [ 18const listVideoCommentsValidator = [
19 query('isLocal') 19 query('isLocal')
20 .optional() 20 .optional()
21 .customSanitizer(toBooleanOrNull)
21 .custom(isBooleanValid) 22 .custom(isBooleanValid)
22 .withMessage('Should have a valid is local boolean'), 23 .withMessage('Should have a valid is local boolean'),
23 24