]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/pagination.ts
Cleanup useless express validator messages
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / pagination.ts
index 74eae251e04790dbbd53a60b02e7446106995f12..ce371d6c116ece94608408cefc67a28cdb3184d3 100644 (file)
@@ -1,4 +1,4 @@
-import * as express from 'express'
+import express from 'express'
 import { query } from 'express-validator'
 import { PAGINATION } from '@server/initializers/constants'
 import { logger } from '../../helpers/logger'
@@ -10,7 +10,7 @@ function paginationValidatorBuilder (tags: string[] = []) {
   return [
     query('start')
       .optional()
-      .isInt({ min: 0 }).withMessage('Should have a number start'),
+      .isInt({ min: 0 }),
     query('count')
       .optional()
       .isInt({ min: 0, max: PAGINATION.GLOBAL.COUNT.MAX }).withMessage(`Should have a number count (max: ${PAGINATION.GLOBAL.COUNT.MAX})`),