diff options
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/config.ts | 4 |
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' | |||
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 { isEmailEnabled } from '@server/initializers/config' | 4 | import { isEmailEnabled } from '@server/initializers/config' |
5 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/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 { logger } from '../../helpers/logger' |
9 | import { isThemeRegistered } from '../../lib/plugins/theme-utils' | 10 | import { isThemeRegistered } from '../../lib/plugins/theme-utils' |
10 | import { areValidationErrors } from './utils' | 11 | import { areValidationErrors } from './utils' |
11 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
12 | 12 | ||
13 | const customConfigUpdateValidator = [ | 13 | const 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'), |