diff options
Diffstat (limited to 'server/controllers/api/config.ts')
-rw-r--r-- | server/controllers/api/config.ts | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts index ae4e00248..69940f395 100644 --- a/server/controllers/api/config.ts +++ b/server/controllers/api/config.ts | |||
@@ -31,12 +31,12 @@ configRouter.get('/', | |||
31 | configRouter.get('/custom', | 31 | configRouter.get('/custom', |
32 | authenticate, | 32 | authenticate, |
33 | ensureUserHasRight(UserRight.MANAGE_CONFIGURATION), | 33 | ensureUserHasRight(UserRight.MANAGE_CONFIGURATION), |
34 | asyncMiddleware(getCustomConfig) | 34 | getCustomConfig |
35 | ) | 35 | ) |
36 | configRouter.put('/custom', | 36 | configRouter.put('/custom', |
37 | authenticate, | 37 | authenticate, |
38 | ensureUserHasRight(UserRight.MANAGE_CONFIGURATION), | 38 | ensureUserHasRight(UserRight.MANAGE_CONFIGURATION), |
39 | asyncMiddleware(customConfigUpdateValidator), | 39 | customConfigUpdateValidator, |
40 | asyncMiddleware(updateCustomConfig) | 40 | asyncMiddleware(updateCustomConfig) |
41 | ) | 41 | ) |
42 | configRouter.delete('/custom', | 42 | configRouter.delete('/custom', |
@@ -196,7 +196,7 @@ function getAbout (req: express.Request, res: express.Response) { | |||
196 | return res.json(about).end() | 196 | return res.json(about).end() |
197 | } | 197 | } |
198 | 198 | ||
199 | async function getCustomConfig (req: express.Request, res: express.Response) { | 199 | function getCustomConfig (req: express.Request, res: express.Response) { |
200 | const data = customConfig() | 200 | const data = customConfig() |
201 | 201 | ||
202 | return res.json(data).end() | 202 | return res.json(data).end() |
@@ -250,7 +250,7 @@ function getRegisteredThemes () { | |||
250 | 250 | ||
251 | function getEnabledResolutions () { | 251 | function getEnabledResolutions () { |
252 | return Object.keys(CONFIG.TRANSCODING.RESOLUTIONS) | 252 | return Object.keys(CONFIG.TRANSCODING.RESOLUTIONS) |
253 | .filter(key => CONFIG.TRANSCODING.ENABLED && CONFIG.TRANSCODING.RESOLUTIONS[ key ] === true) | 253 | .filter(key => CONFIG.TRANSCODING.ENABLED && CONFIG.TRANSCODING.RESOLUTIONS[key] === true) |
254 | .map(r => parseInt(r, 10)) | 254 | .map(r => parseInt(r, 10)) |
255 | } | 255 | } |
256 | 256 | ||
@@ -340,13 +340,13 @@ function customConfig (): CustomConfig { | |||
340 | allowAudioFiles: CONFIG.TRANSCODING.ALLOW_AUDIO_FILES, | 340 | allowAudioFiles: CONFIG.TRANSCODING.ALLOW_AUDIO_FILES, |
341 | threads: CONFIG.TRANSCODING.THREADS, | 341 | threads: CONFIG.TRANSCODING.THREADS, |
342 | resolutions: { | 342 | resolutions: { |
343 | '0p': CONFIG.TRANSCODING.RESOLUTIONS[ '0p' ], | 343 | '0p': CONFIG.TRANSCODING.RESOLUTIONS['0p'], |
344 | '240p': CONFIG.TRANSCODING.RESOLUTIONS[ '240p' ], | 344 | '240p': CONFIG.TRANSCODING.RESOLUTIONS['240p'], |
345 | '360p': CONFIG.TRANSCODING.RESOLUTIONS[ '360p' ], | 345 | '360p': CONFIG.TRANSCODING.RESOLUTIONS['360p'], |
346 | '480p': CONFIG.TRANSCODING.RESOLUTIONS[ '480p' ], | 346 | '480p': CONFIG.TRANSCODING.RESOLUTIONS['480p'], |
347 | '720p': CONFIG.TRANSCODING.RESOLUTIONS[ '720p' ], | 347 | '720p': CONFIG.TRANSCODING.RESOLUTIONS['720p'], |
348 | '1080p': CONFIG.TRANSCODING.RESOLUTIONS[ '1080p' ], | 348 | '1080p': CONFIG.TRANSCODING.RESOLUTIONS['1080p'], |
349 | '2160p': CONFIG.TRANSCODING.RESOLUTIONS[ '2160p' ] | 349 | '2160p': CONFIG.TRANSCODING.RESOLUTIONS['2160p'] |
350 | }, | 350 | }, |
351 | webtorrent: { | 351 | webtorrent: { |
352 | enabled: CONFIG.TRANSCODING.WEBTORRENT.ENABLED | 352 | enabled: CONFIG.TRANSCODING.WEBTORRENT.ENABLED |