diff options
Diffstat (limited to 'server/middlewares/validators/config.ts')
-rw-r--r-- | server/middlewares/validators/config.ts | 5 |
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' | |||
2 | import { body } from 'express-validator' | 2 | import { body } from 'express-validator' |
3 | import { isIntOrNull } from '@server/helpers/custom-validators/misc' | 3 | import { isIntOrNull } from '@server/helpers/custom-validators/misc' |
4 | import { CONFIG, isEmailEnabled } from '@server/initializers/config' | 4 | import { CONFIG, isEmailEnabled } from '@server/initializers/config' |
5 | import { HttpStatusCode } from '@shared/models/http/http-error-codes' | ||
5 | import { CustomConfig } from '../../../shared/models/server/custom-config.model' | 6 | import { CustomConfig } from '../../../shared/models/server/custom-config.model' |
6 | import { isThemeNameValid } from '../../helpers/custom-validators/plugins' | 7 | import { isThemeNameValid } from '../../helpers/custom-validators/plugins' |
7 | import { isUserNSFWPolicyValid, isUserVideoQuotaDailyValid, isUserVideoQuotaValid } from '../../helpers/custom-validators/users' | 8 | import { isUserNSFWPolicyValid, isUserVideoQuotaDailyValid, isUserVideoQuotaValid } from '../../helpers/custom-validators/users' |
8 | import { logger } from '../../helpers/logger' | ||
9 | import { isThemeRegistered } from '../../lib/plugins/theme-utils' | 9 | import { isThemeRegistered } from '../../lib/plugins/theme-utils' |
10 | import { areValidationErrors } from './shared' | 10 | import { areValidationErrors } from './shared' |
11 | import { HttpStatusCode } from '@shared/models/http/http-error-codes' | ||
12 | 11 | ||
13 | const customConfigUpdateValidator = [ | 12 | const 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 |