aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/config.ts
diff options
context:
space:
mode:
authorGérald Niel <gerald.niel@gegeweb.org>2018-04-19 19:28:55 +0200
committerGérald Niel <gerald.niel@gegeweb.org>2018-04-19 19:28:55 +0200
commit0db1a226507a39b0a663e3e63f04851836a44d5a (patch)
tree8c8dad658ea5608afaae238cfb6fe803292f908f /server/controllers/api/config.ts
parent0030284b0df2983914291d6fe83675e2aa892e6a (diff)
parentd4f3fea659163749f9ea879a5e1dd313106353c6 (diff)
downloadPeerTube-0db1a226507a39b0a663e3e63f04851836a44d5a.tar.gz
PeerTube-0db1a226507a39b0a663e3e63f04851836a44d5a.tar.zst
PeerTube-0db1a226507a39b0a663e3e63f04851836a44d5a.zip
Merge branch 'develop' of framagit.org:chocobozzz/PeerTube into develop
Diffstat (limited to 'server/controllers/api/config.ts')
-rw-r--r--server/controllers/api/config.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index 88f047adc..e47b71f44 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -46,6 +46,7 @@ async function getConfig (req: express.Request, res: express.Response, next: exp
46 name: CONFIG.INSTANCE.NAME, 46 name: CONFIG.INSTANCE.NAME,
47 shortDescription: CONFIG.INSTANCE.SHORT_DESCRIPTION, 47 shortDescription: CONFIG.INSTANCE.SHORT_DESCRIPTION,
48 defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE, 48 defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE,
49 defaultNSFWPolicy: CONFIG.INSTANCE.DEFAULT_NSFW_POLICY,
49 customizations: { 50 customizations: {
50 javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT, 51 javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT,
51 css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS 52 css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS
@@ -128,6 +129,7 @@ async function updateCustomConfig (req: express.Request, res: express.Response,
128 toUpdateJSON.user['video_quota'] = toUpdate.user.videoQuota 129 toUpdateJSON.user['video_quota'] = toUpdate.user.videoQuota
129 toUpdateJSON.instance['default_client_route'] = toUpdate.instance.defaultClientRoute 130 toUpdateJSON.instance['default_client_route'] = toUpdate.instance.defaultClientRoute
130 toUpdateJSON.instance['short_description'] = toUpdate.instance.shortDescription 131 toUpdateJSON.instance['short_description'] = toUpdate.instance.shortDescription
132 toUpdateJSON.instance['default_nsfw_policy'] = toUpdate.instance.defaultNSFWPolicy
131 133
132 await writeFilePromise(CONFIG.CUSTOM_FILE, JSON.stringify(toUpdateJSON, undefined, 2)) 134 await writeFilePromise(CONFIG.CUSTOM_FILE, JSON.stringify(toUpdateJSON, undefined, 2))
133 135
@@ -153,6 +155,7 @@ function customConfig (): CustomConfig {
153 description: CONFIG.INSTANCE.DESCRIPTION, 155 description: CONFIG.INSTANCE.DESCRIPTION,
154 terms: CONFIG.INSTANCE.TERMS, 156 terms: CONFIG.INSTANCE.TERMS,
155 defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE, 157 defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE,
158 defaultNSFWPolicy: CONFIG.INSTANCE.DEFAULT_NSFW_POLICY,
156 customizations: { 159 customizations: {
157 css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS, 160 css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS,
158 javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT 161 javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT