aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/config.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/config.ts b/server/middlewares/validators/config.ts
index 93de453a7..9c1cfa7e7 100644
--- a/server/middlewares/validators/config.ts
+++ b/server/middlewares/validators/config.ts
@@ -2,13 +2,13 @@ import * as 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 { isEmailEnabled } from '@server/initializers/config' 4import { isEmailEnabled } from '@server/initializers/config'
5import { HttpStatusCode } from '../../../shared/core-utils/miscs/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 { logger } from '../../helpers/logger'
9import { isThemeRegistered } from '../../lib/plugins/theme-utils' 10import { isThemeRegistered } from '../../lib/plugins/theme-utils'
10import { areValidationErrors } from './utils' 11import { areValidationErrors } from './utils'
11import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
12 12
13const customConfigUpdateValidator = [ 13const customConfigUpdateValidator = [
14 body('instance.name').exists().withMessage('Should have a valid instance name'), 14 body('instance.name').exists().withMessage('Should have a valid instance name'),
@@ -65,7 +65,7 @@ const customConfigUpdateValidator = [
65 65
66 body('live.enabled').isBoolean().withMessage('Should have a valid live enabled boolean'), 66 body('live.enabled').isBoolean().withMessage('Should have a valid live enabled boolean'),
67 body('live.allowReplay').isBoolean().withMessage('Should have a valid live allow replay boolean'), 67 body('live.allowReplay').isBoolean().withMessage('Should have a valid live allow replay boolean'),
68 body('live.maxDuration').custom(isIntOrNull).withMessage('Should have a valid live max duration'), 68 body('live.maxDuration').isInt().withMessage('Should have a valid live max duration'),
69 body('live.maxInstanceLives').custom(isIntOrNull).withMessage('Should have a valid max instance lives'), 69 body('live.maxInstanceLives').custom(isIntOrNull).withMessage('Should have a valid max instance lives'),
70 body('live.maxUserLives').custom(isIntOrNull).withMessage('Should have a valid max user lives'), 70 body('live.maxUserLives').custom(isIntOrNull).withMessage('Should have a valid max user lives'),
71 body('live.transcoding.enabled').isBoolean().withMessage('Should have a valid live transcoding enabled boolean'), 71 body('live.transcoding.enabled').isBoolean().withMessage('Should have a valid live transcoding enabled boolean'),