diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-17 14:58:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-17 14:58:40 +0200 |
commit | a85d530384761a0af833caac9b38b9834517c9fa (patch) | |
tree | 5407dbcc32b6324067632d4c99f25a6b7d851230 /server/middlewares/validators/activitypub | |
parent | 2ec349aa857b0bd8f26de5cd78981d60c9b98a69 (diff) | |
download | PeerTube-a85d530384761a0af833caac9b38b9834517c9fa.tar.gz PeerTube-a85d530384761a0af833caac9b38b9834517c9fa.tar.zst PeerTube-a85d530384761a0af833caac9b38b9834517c9fa.zip |
Remove unnecessary logs
Diffstat (limited to 'server/middlewares/validators/activitypub')
-rw-r--r-- | server/middlewares/validators/activitypub/pagination.ts | 3 | ||||
-rw-r--r-- | server/middlewares/validators/activitypub/signature.ts | 2 |
2 files changed, 1 insertions, 4 deletions
diff --git a/server/middlewares/validators/activitypub/pagination.ts b/server/middlewares/validators/activitypub/pagination.ts index 69c4febaf..1259e4fef 100644 --- a/server/middlewares/validators/activitypub/pagination.ts +++ b/server/middlewares/validators/activitypub/pagination.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | import express from 'express' | 1 | import express from 'express' |
2 | import { query } from 'express-validator' | 2 | import { query } from 'express-validator' |
3 | import { PAGINATION } from '@server/initializers/constants' | 3 | import { PAGINATION } from '@server/initializers/constants' |
4 | import { logger } from '../../../helpers/logger' | ||
5 | import { areValidationErrors } from '../shared' | 4 | import { areValidationErrors } from '../shared' |
6 | 5 | ||
7 | const apPaginationValidator = [ | 6 | const apPaginationValidator = [ |
@@ -13,8 +12,6 @@ const apPaginationValidator = [ | |||
13 | .isInt({ min: 0, max: PAGINATION.OUTBOX.COUNT.MAX }).withMessage(`Should have a valid page size (max: ${PAGINATION.OUTBOX.COUNT.MAX})`), | 12 | .isInt({ min: 0, max: PAGINATION.OUTBOX.COUNT.MAX }).withMessage(`Should have a valid page size (max: ${PAGINATION.OUTBOX.COUNT.MAX})`), |
14 | 13 | ||
15 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | 14 | (req: express.Request, res: express.Response, next: express.NextFunction) => { |
16 | logger.debug('Checking pagination parameters', { parameters: req.query }) | ||
17 | |||
18 | if (areValidationErrors(req, res)) return | 15 | if (areValidationErrors(req, res)) return |
19 | 16 | ||
20 | return next() | 17 | return next() |
diff --git a/server/middlewares/validators/activitypub/signature.ts b/server/middlewares/validators/activitypub/signature.ts index 8c133ecef..998d0c0c4 100644 --- a/server/middlewares/validators/activitypub/signature.ts +++ b/server/middlewares/validators/activitypub/signature.ts | |||
@@ -26,7 +26,7 @@ const signatureValidator = [ | |||
26 | (req: express.Request, res: express.Response, next: express.NextFunction) => { | 26 | (req: express.Request, res: express.Response, next: express.NextFunction) => { |
27 | logger.debug('Checking Linked Data Signature parameter', { parameters: { signature: req.body.signature } }) | 27 | logger.debug('Checking Linked Data Signature parameter', { parameters: { signature: req.body.signature } }) |
28 | 28 | ||
29 | if (areValidationErrors(req, res)) return | 29 | if (areValidationErrors(req, res, { omitLog: true })) return |
30 | 30 | ||
31 | return next() | 31 | return next() |
32 | } | 32 | } |