aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/config.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/config.ts
parent2ec349aa857b0bd8f26de5cd78981d60c9b98a69 (diff)
downloadPeerTube-a85d530384761a0af833caac9b38b9834517c9fa.tar.gz
PeerTube-a85d530384761a0af833caac9b38b9834517c9fa.tar.zst
PeerTube-a85d530384761a0af833caac9b38b9834517c9fa.zip
Remove unnecessary logs
Diffstat (limited to 'server/middlewares/validators/config.ts')
-rw-r--r--server/middlewares/validators/config.ts5
1 files changed, 1 insertions, 4 deletions
diff --git a/server/middlewares/validators/config.ts b/server/middlewares/validators/config.ts
index c89f3087e..3a7daa573 100644
--- a/server/middlewares/validators/config.ts
+++ b/server/middlewares/validators/config.ts
@@ -2,13 +2,12 @@ import express from 'express'
2import { body } from 'express-validator' 2import { body } from 'express-validator'
3import { isIntOrNull } from '@server/helpers/custom-validators/misc' 3import { isIntOrNull } from '@server/helpers/custom-validators/misc'
4import { CONFIG, isEmailEnabled } from '@server/initializers/config' 4import { CONFIG, isEmailEnabled } from '@server/initializers/config'
5import { HttpStatusCode } from '@shared/models/http/http-error-codes'
5import { CustomConfig } from '../../../shared/models/server/custom-config.model' 6import { CustomConfig } from '../../../shared/models/server/custom-config.model'
6import { isThemeNameValid } from '../../helpers/custom-validators/plugins' 7import { isThemeNameValid } from '../../helpers/custom-validators/plugins'
7import { isUserNSFWPolicyValid, isUserVideoQuotaDailyValid, isUserVideoQuotaValid } from '../../helpers/custom-validators/users' 8import { isUserNSFWPolicyValid, isUserVideoQuotaDailyValid, isUserVideoQuotaValid } from '../../helpers/custom-validators/users'
8import { logger } from '../../helpers/logger'
9import { isThemeRegistered } from '../../lib/plugins/theme-utils' 9import { isThemeRegistered } from '../../lib/plugins/theme-utils'
10import { areValidationErrors } from './shared' 10import { areValidationErrors } from './shared'
11import { HttpStatusCode } from '@shared/models/http/http-error-codes'
12 11
13const customConfigUpdateValidator = [ 12const customConfigUpdateValidator = [
14 body('instance.name').exists(), 13 body('instance.name').exists(),
@@ -105,8 +104,6 @@ const customConfigUpdateValidator = [
105 body('search.searchIndex.isDefaultSearch').isBoolean(), 104 body('search.searchIndex.isDefaultSearch').isBoolean(),
106 105
107 (req: express.Request, res: express.Response, next: express.NextFunction) => { 106 (req: express.Request, res: express.Response, next: express.NextFunction) => {
108 logger.debug('Checking customConfigUpdateValidator parameters', { parameters: req.body })
109
110 if (areValidationErrors(req, res)) return 107 if (areValidationErrors(req, res)) return
111 if (!checkInvalidConfigIfEmailDisabled(req.body, res)) return 108 if (!checkInvalidConfigIfEmailDisabled(req.body, res)) return
112 if (!checkInvalidTranscodingConfig(req.body, res)) return 109 if (!checkInvalidTranscodingConfig(req.body, res)) return