1 import express from 'express'
2 import { query } from 'express-validator'
3 import { PAGINATION } from '@server/initializers/constants'
4 import { areValidationErrors } from '../shared'
6 const apPaginationValidator = [
12 .isInt({ min: 0, max: PAGINATION.OUTBOX.COUNT.MAX }).withMessage(`Should have a valid page size (max: ${PAGINATION.OUTBOX.COUNT.MAX})`),
14 (req: express.Request, res: express.Response, next: express.NextFunction) => {
15 if (areValidationErrors(req, res)) return
21 // ---------------------------------------------------------------------------