aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/config.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-22 16:58:49 +0100
committerChocobozzz <me@florianbigard.com>2022-03-22 17:24:32 +0100
commit92e66e04f7f51d37b465cff442ce47f6d6d7cadd (patch)
tree4475c5c601c0f6673ca56afba5b7f70a4fae4ec3 /server/middlewares/validators/config.ts
parent1808a1f8e4b7b102823492a2007a46929aebf189 (diff)
downloadPeerTube-92e66e04f7f51d37b465cff442ce47f6d6d7cadd.tar.gz
PeerTube-92e66e04f7f51d37b465cff442ce47f6d6d7cadd.tar.zst
PeerTube-92e66e04f7f51d37b465cff442ce47f6d6d7cadd.zip
Rename studio to editor
Diffstat (limited to 'server/middlewares/validators/config.ts')
-rw-r--r--server/middlewares/validators/config.ts12
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
166function checkInvalidVideoEditorConfig (customConfig: CustomConfig, res: express.Response) { 166function 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