diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-17 14:27:04 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-17 14:27:04 +0200 |
commit | 396f6f0140b0f76162e2378fd5a61e2f888673ed (patch) | |
tree | a5bd668bfc7dca7f311b9fc42ebb8bd01f462648 /server/middlewares/validators/jobs.ts | |
parent | 97eba003a9d0adcb0cab9190f566327b1417c7d3 (diff) | |
download | PeerTube-396f6f0140b0f76162e2378fd5a61e2f888673ed.tar.gz PeerTube-396f6f0140b0f76162e2378fd5a61e2f888673ed.tar.zst PeerTube-396f6f0140b0f76162e2378fd5a61e2f888673ed.zip |
Cleanup useless express validator messages
Diffstat (limited to 'server/middlewares/validators/jobs.ts')
-rw-r--r-- | server/middlewares/validators/jobs.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/middlewares/validators/jobs.ts b/server/middlewares/validators/jobs.ts index 4de90548b..971c2060c 100644 --- a/server/middlewares/validators/jobs.ts +++ b/server/middlewares/validators/jobs.ts | |||
@@ -8,12 +8,12 @@ const lTags = loggerTagsFactory('validators', 'jobs') | |||
8 | 8 | ||
9 | const listJobsValidator = [ | 9 | const listJobsValidator = [ |
10 | param('state') | 10 | param('state') |
11 | .optional() | 11 | .optional() |
12 | .custom(isValidJobState).not().isEmpty().withMessage('Should have a valid job state'), | 12 | .custom(isValidJobState), |
13 | 13 | ||
14 | query('jobType') | 14 | query('jobType') |
15 | .optional() | 15 | .optional() |
16 | .custom(isValidJobType).withMessage('Should have a valid job state'), | 16 | .custom(isValidJobType), |
17 | 17 | ||
18 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | 18 | (req: express.Request, res: express.Response, next: express.NextFunction) => { |
19 | logger.debug('Checking listJobsValidator parameters.', { parameters: req.params, ...lTags() }) | 19 | logger.debug('Checking listJobsValidator parameters.', { parameters: req.params, ...lTags() }) |