1 import express from 'express'
2 import { param, query } from 'express-validator'
3 import { isValidJobState, isValidJobType } from '../../helpers/custom-validators/jobs'
4 import { loggerTagsFactory } from '../../helpers/logger'
5 import { areValidationErrors } from './shared'
7 const lTags = loggerTagsFactory('validators', 'jobs')
9 const listJobsValidator = [
12 .custom(isValidJobState),
16 .custom(isValidJobType),
18 (req: express.Request, res: express.Response, next: express.NextFunction) => {
19 if (areValidationErrors(req, res, lTags())) return
25 // ---------------------------------------------------------------------------