aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/logs.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/logs.ts
parent2ec349aa857b0bd8f26de5cd78981d60c9b98a69 (diff)
downloadPeerTube-a85d530384761a0af833caac9b38b9834517c9fa.tar.gz
PeerTube-a85d530384761a0af833caac9b38b9834517c9fa.tar.zst
PeerTube-a85d530384761a0af833caac9b38b9834517c9fa.zip
Remove unnecessary logs
Diffstat (limited to 'server/middlewares/validators/logs.ts')
-rw-r--r--server/middlewares/validators/logs.ts7
1 files changed, 0 insertions, 7 deletions
diff --git a/server/middlewares/validators/logs.ts b/server/middlewares/validators/logs.ts
index ce36dc40b..584cb2aaf 100644
--- a/server/middlewares/validators/logs.ts
+++ b/server/middlewares/validators/logs.ts
@@ -13,7 +13,6 @@ import {
13 isValidLogLevel 13 isValidLogLevel
14} from '../../helpers/custom-validators/logs' 14} from '../../helpers/custom-validators/logs'
15import { isDateValid, toArray } from '../../helpers/custom-validators/misc' 15import { isDateValid, toArray } from '../../helpers/custom-validators/misc'
16import { logger } from '../../helpers/logger'
17import { areValidationErrors } from './shared' 16import { areValidationErrors } from './shared'
18 17
19const createClientLogValidator = [ 18const createClientLogValidator = [
@@ -39,8 +38,6 @@ const createClientLogValidator = [
39 .custom(isValidClientLogUserAgent), 38 .custom(isValidClientLogUserAgent),
40 39
41 (req: express.Request, res: express.Response, next: express.NextFunction) => { 40 (req: express.Request, res: express.Response, next: express.NextFunction) => {
42 logger.debug('Checking createClientLogValidator parameters.', { parameters: req.query })
43
44 if (CONFIG.LOG.ACCEPT_CLIENT_LOG !== true) { 41 if (CONFIG.LOG.ACCEPT_CLIENT_LOG !== true) {
45 return res.sendStatus(HttpStatusCode.FORBIDDEN_403) 42 return res.sendStatus(HttpStatusCode.FORBIDDEN_403)
46 } 43 }
@@ -66,8 +63,6 @@ const getLogsValidator = [
66 .custom(isDateValid).withMessage('Should have an end date that conforms to ISO 8601'), 63 .custom(isDateValid).withMessage('Should have an end date that conforms to ISO 8601'),
67 64
68 (req: express.Request, res: express.Response, next: express.NextFunction) => { 65 (req: express.Request, res: express.Response, next: express.NextFunction) => {
69 logger.debug('Checking getLogsValidator parameters.', { parameters: req.query })
70
71 if (areValidationErrors(req, res)) return 66 if (areValidationErrors(req, res)) return
72 67
73 return next() 68 return next()
@@ -82,8 +77,6 @@ const getAuditLogsValidator = [
82 .custom(isDateValid).withMessage('Should have a end date that conforms to ISO 8601'), 77 .custom(isDateValid).withMessage('Should have a end date that conforms to ISO 8601'),
83 78
84 (req: express.Request, res: express.Response, next: express.NextFunction) => { 79 (req: express.Request, res: express.Response, next: express.NextFunction) => {
85 logger.debug('Checking getAuditLogsValidator parameters.', { parameters: req.query })
86
87 if (areValidationErrors(req, res)) return 80 if (areValidationErrors(req, res)) return
88 81
89 return next() 82 return next()