aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/abuse.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/abuse.ts')
-rw-r--r--server/middlewares/validators/abuse.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/middlewares/validators/abuse.ts b/server/middlewares/validators/abuse.ts
index 56c97747c..c048bc6af 100644
--- a/server/middlewares/validators/abuse.ts
+++ b/server/middlewares/validators/abuse.ts
@@ -12,7 +12,7 @@ import {
12 isAbuseTimestampValid, 12 isAbuseTimestampValid,
13 isAbuseVideoIsValid 13 isAbuseVideoIsValid
14} from '@server/helpers/custom-validators/abuses' 14} from '@server/helpers/custom-validators/abuses'
15import { exists, isIdOrUUIDValid, isIdValid, toIntOrNull } from '@server/helpers/custom-validators/misc' 15import { exists, isIdOrUUIDValid, isIdValid, toCompleteUUID, toIntOrNull } from '@server/helpers/custom-validators/misc'
16import { logger } from '@server/helpers/logger' 16import { logger } from '@server/helpers/logger'
17import { AbuseMessageModel } from '@server/models/abuse/abuse-message' 17import { AbuseMessageModel } from '@server/models/abuse/abuse-message'
18import { AbuseCreate, UserRight } from '@shared/models' 18import { AbuseCreate, UserRight } from '@shared/models'
@@ -27,6 +27,7 @@ const abuseReportValidator = [
27 27
28 body('video.id') 28 body('video.id')
29 .optional() 29 .optional()
30 .customSanitizer(toCompleteUUID)
30 .custom(isIdOrUUIDValid) 31 .custom(isIdOrUUIDValid)
31 .withMessage('Should have a valid videoId'), 32 .withMessage('Should have a valid videoId'),
32 body('video.startAt') 33 body('video.startAt')