]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/metrics.ts
Cleanup useless express validator messages
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / metrics.ts
index b1dbec603c89ee8f3f85bb0020d904e18d2c8732..cd6f872daa4000d6194d49c32b26875bdd5721ef 100644 (file)
@@ -9,30 +9,29 @@ import { areValidationErrors, doesVideoExist } from './shared'
 
 const addPlaybackMetricValidator = [
   body('resolution')
-    .isInt({ min: 0 }).withMessage('Invalid resolution'),
+    .isInt({ min: 0 }),
   body('fps')
     .optional()
-    .isInt({ min: 0 }).withMessage('Invalid fps'),
+    .isInt({ min: 0 }),
   body('playerMode')
-    .custom(isValidPlayerMode).withMessage('Invalid playerMode'),
+    .custom(isValidPlayerMode),
 
   body('resolutionChanges')
-    .isInt({ min: 0 }).withMessage('Invalid resolutionChanges'),
+    .isInt({ min: 0 }),
 
   body('errors')
-    .isInt({ min: 0 }).withMessage('Invalid errors'),
+    .isInt({ min: 0 }),
 
   body('downloadedBytesP2P')
-    .isInt({ min: 0 }).withMessage('Invalid downloadedBytesP2P'),
+    .isInt({ min: 0 }),
   body('downloadedBytesHTTP')
-    .isInt({ min: 0 }).withMessage('Invalid downloadedBytesHTTP'),
+    .isInt({ min: 0 }),
 
   body('uploadedBytesP2P')
-    .isInt({ min: 0 }).withMessage('Invalid uploadedBytesP2P'),
+    .isInt({ min: 0 }),
 
   body('videoId')
     .customSanitizer(toCompleteUUID)
-    .optional()
     .custom(isIdOrUUIDValid),
 
   async (req: express.Request, res: express.Response, next: express.NextFunction) => {