aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/jobs.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-17 14:58:40 +0200
committerChocobozzz <me@florianbigard.com>2022-08-17 14:58:40 +0200
commita85d530384761a0af833caac9b38b9834517c9fa (patch)
tree5407dbcc32b6324067632d4c99f25a6b7d851230 /server/middlewares/validators/jobs.ts
parent2ec349aa857b0bd8f26de5cd78981d60c9b98a69 (diff)
downloadPeerTube-a85d530384761a0af833caac9b38b9834517c9fa.tar.gz
PeerTube-a85d530384761a0af833caac9b38b9834517c9fa.tar.zst
PeerTube-a85d530384761a0af833caac9b38b9834517c9fa.zip
Remove unnecessary logs
Diffstat (limited to 'server/middlewares/validators/jobs.ts')
-rw-r--r--server/middlewares/validators/jobs.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/server/middlewares/validators/jobs.ts b/server/middlewares/validators/jobs.ts
index 971c2060c..e5008adc3 100644
--- a/server/middlewares/validators/jobs.ts
+++ b/server/middlewares/validators/jobs.ts
@@ -1,7 +1,7 @@
1import express from 'express' 1import express from 'express'
2import { param, query } from 'express-validator' 2import { param, query } from 'express-validator'
3import { isValidJobState, isValidJobType } from '../../helpers/custom-validators/jobs' 3import { isValidJobState, isValidJobType } from '../../helpers/custom-validators/jobs'
4import { logger, loggerTagsFactory } from '../../helpers/logger' 4import { loggerTagsFactory } from '../../helpers/logger'
5import { areValidationErrors } from './shared' 5import { areValidationErrors } from './shared'
6 6
7const lTags = loggerTagsFactory('validators', 'jobs') 7const lTags = loggerTagsFactory('validators', 'jobs')
@@ -16,9 +16,7 @@ const listJobsValidator = [
16 .custom(isValidJobType), 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 if (areValidationErrors(req, res, lTags())) return
20
21 if (areValidationErrors(req, res)) return
22 20
23 return next() 21 return next()
24 } 22 }