From 901637bb87f5eb0518fb7ca69d98b53ed918339e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 1 Mar 2018 13:57:29 +0100 Subject: Add ability to change the homepage --- server/controllers/api/config.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'server/controllers') diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts index 427125810..a25d7a157 100644 --- a/server/controllers/api/config.ts +++ b/server/controllers/api/config.ts @@ -44,6 +44,7 @@ async function getConfig (req: express.Request, res: express.Response, next: exp const json: ServerConfig = { instance: { name: CONFIG.INSTANCE.NAME, + defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE, customizations: { javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT, css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS @@ -114,7 +115,9 @@ async function updateCustomConfig (req: express.Request, res: express.Response, // Need to change the videoQuota key a little bit const toUpdateJSON = omit(toUpdate, 'videoQuota') toUpdateJSON.user['video_quota'] = toUpdate.user.videoQuota + toUpdateJSON.instance['default_client_route'] = toUpdate.instance.defaultClientRoute delete toUpdate.user.videoQuota + delete toUpdate.instance.defaultClientRoute await writeFilePromise(CONFIG.CUSTOM_FILE, JSON.stringify(toUpdateJSON, undefined, 2)) @@ -138,6 +141,7 @@ function customConfig (): CustomConfig { name: CONFIG.INSTANCE.NAME, description: CONFIG.INSTANCE.DESCRIPTION, terms: CONFIG.INSTANCE.TERMS, + defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE, customizations: { css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS, javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT -- cgit v1.2.3