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) => {