aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-07 11:53:46 +0200
committerChocobozzz <me@florianbigard.com>2021-05-07 11:53:46 +0200
commita1bb73f9b591686b2ddfeb3291f305dae9f7fc6c (patch)
tree0386b60da767075a890d45d947a6805ca32fd742 /shared/extra-utils/server
parentbc4c9cc1d75d591c217d61ab22a107b7f1044c76 (diff)
downloadPeerTube-a1bb73f9b591686b2ddfeb3291f305dae9f7fc6c.tar.gz
PeerTube-a1bb73f9b591686b2ddfeb3291f305dae9f7fc6c.tar.zst
PeerTube-a1bb73f9b591686b2ddfeb3291f305dae9f7fc6c.zip
Refactor a little bit live tests
Diffstat (limited to 'shared/extra-utils/server')
-rw-r--r--shared/extra-utils/server/config.ts15
1 files changed, 14 insertions, 1 deletions
diff --git a/shared/extra-utils/server/config.ts b/shared/extra-utils/server/config.ts
index 026a5e61c..b70110852 100644
--- a/shared/extra-utils/server/config.ts
+++ b/shared/extra-utils/server/config.ts
@@ -223,6 +223,18 @@ function updateCustomSubConfig (url: string, token: string, newConfig: DeepParti
223 return updateCustomConfig(url, token, updateParams) 223 return updateCustomConfig(url, token, updateParams)
224} 224}
225 225
226function getCustomConfigResolutions (enabled: boolean) {
227 return {
228 '240p': enabled,
229 '360p': enabled,
230 '480p': enabled,
231 '720p': enabled,
232 '1080p': enabled,
233 '1440p': enabled,
234 '2160p': enabled
235 }
236}
237
226function deleteCustomConfig (url: string, token: string, statusCodeExpected = HttpStatusCode.OK_200) { 238function deleteCustomConfig (url: string, token: string, statusCodeExpected = HttpStatusCode.OK_200) {
227 const path = '/api/v1/config/custom' 239 const path = '/api/v1/config/custom'
228 240
@@ -242,5 +254,6 @@ export {
242 updateCustomConfig, 254 updateCustomConfig,
243 getAbout, 255 getAbout,
244 deleteCustomConfig, 256 deleteCustomConfig,
245 updateCustomSubConfig 257 updateCustomSubConfig,
258 getCustomConfigResolutions
246} 259}