]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/abuse.ts
Hide schedule privacy if private does not exist
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / abuse.ts
index 56c97747cefa7a810f6ef8b33a71152eefafccea..c048bc6af344c899b750d762aee9813f76f49385 100644 (file)
@@ -12,7 +12,7 @@ import {
   isAbuseTimestampValid,
   isAbuseVideoIsValid
 } from '@server/helpers/custom-validators/abuses'
-import { exists, isIdOrUUIDValid, isIdValid, toIntOrNull } from '@server/helpers/custom-validators/misc'
+import { exists, isIdOrUUIDValid, isIdValid, toCompleteUUID, toIntOrNull } from '@server/helpers/custom-validators/misc'
 import { logger } from '@server/helpers/logger'
 import { AbuseMessageModel } from '@server/models/abuse/abuse-message'
 import { AbuseCreate, UserRight } from '@shared/models'
@@ -27,6 +27,7 @@ const abuseReportValidator = [
 
   body('video.id')
     .optional()
+    .customSanitizer(toCompleteUUID)
     .custom(isIdOrUUIDValid)
     .withMessage('Should have a valid videoId'),
   body('video.startAt')