diff options
Diffstat (limited to 'server/middlewares/validators/abuse.ts')
-rw-r--r-- | server/middlewares/validators/abuse.ts | 3 |
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' |
15 | import { exists, isIdOrUUIDValid, isIdValid, toIntOrNull } from '@server/helpers/custom-validators/misc' | 15 | import { exists, isIdOrUUIDValid, isIdValid, toCompleteUUID, toIntOrNull } from '@server/helpers/custom-validators/misc' |
16 | import { logger } from '@server/helpers/logger' | 16 | import { logger } from '@server/helpers/logger' |
17 | import { AbuseMessageModel } from '@server/models/abuse/abuse-message' | 17 | import { AbuseMessageModel } from '@server/models/abuse/abuse-message' |
18 | import { AbuseCreate, UserRight } from '@shared/models' | 18 | import { 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') |