aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/config.ts
diff options
context:
space:
mode:
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