diff options
Diffstat (limited to 'server/middlewares/validators/config.ts')
-rw-r--r-- | server/middlewares/validators/config.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/middlewares/validators/config.ts b/server/middlewares/validators/config.ts index e87b2e39d..1e839d577 100644 --- a/server/middlewares/validators/config.ts +++ b/server/middlewares/validators/config.ts | |||
@@ -57,7 +57,7 @@ const customConfigUpdateValidator = [ | |||
57 | body('transcoding.webtorrent.enabled').isBoolean().withMessage('Should have a valid webtorrent transcoding enabled boolean'), | 57 | body('transcoding.webtorrent.enabled').isBoolean().withMessage('Should have a valid webtorrent transcoding enabled boolean'), |
58 | body('transcoding.hls.enabled').isBoolean().withMessage('Should have a valid hls transcoding enabled boolean'), | 58 | body('transcoding.hls.enabled').isBoolean().withMessage('Should have a valid hls transcoding enabled boolean'), |
59 | 59 | ||
60 | body('videoEditor.enabled').isBoolean().withMessage('Should have a valid video editor enabled boolean'), | 60 | body('videoStudio.enabled').isBoolean().withMessage('Should have a valid video studio enabled boolean'), |
61 | 61 | ||
62 | body('import.videos.concurrency').isInt({ min: 0 }).withMessage('Should have a valid import concurrency number'), | 62 | body('import.videos.concurrency').isInt({ min: 0 }).withMessage('Should have a valid import concurrency number'), |
63 | body('import.videos.http.enabled').isBoolean().withMessage('Should have a valid import video http enabled boolean'), | 63 | body('import.videos.http.enabled').isBoolean().withMessage('Should have a valid import video http enabled boolean'), |
@@ -106,7 +106,7 @@ const customConfigUpdateValidator = [ | |||
106 | if (!checkInvalidConfigIfEmailDisabled(req.body, res)) return | 106 | if (!checkInvalidConfigIfEmailDisabled(req.body, res)) return |
107 | if (!checkInvalidTranscodingConfig(req.body, res)) return | 107 | if (!checkInvalidTranscodingConfig(req.body, res)) return |
108 | if (!checkInvalidLiveConfig(req.body, res)) return | 108 | if (!checkInvalidLiveConfig(req.body, res)) return |
109 | if (!checkInvalidVideoEditorConfig(req.body, res)) return | 109 | if (!checkInvalidVideoStudioConfig(req.body, res)) return |
110 | 110 | ||
111 | return next() | 111 | return next() |
112 | } | 112 | } |
@@ -163,11 +163,11 @@ function checkInvalidLiveConfig (customConfig: CustomConfig, res: express.Respon | |||
163 | return true | 163 | return true |
164 | } | 164 | } |
165 | 165 | ||
166 | function checkInvalidVideoEditorConfig (customConfig: CustomConfig, res: express.Response) { | 166 | function checkInvalidVideoStudioConfig (customConfig: CustomConfig, res: express.Response) { |
167 | if (customConfig.videoEditor.enabled === false) return true | 167 | if (customConfig.videoStudio.enabled === false) return true |
168 | 168 | ||
169 | if (customConfig.videoEditor.enabled === true && customConfig.transcoding.enabled === false) { | 169 | if (customConfig.videoStudio.enabled === true && customConfig.transcoding.enabled === false) { |
170 | res.fail({ message: 'You cannot enable video editor if transcoding is not enabled' }) | 170 | res.fail({ message: 'You cannot enable video studio if transcoding is not enabled' }) |
171 | return false | 171 | return false |
172 | } | 172 | } |
173 | 173 | ||