From 2e3a0215d051dca1f7c8ef423564c8d37a255f77 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 15 Mar 2018 14:31:08 +0100 Subject: Add short description in config --- server/controllers/api/config.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/controllers') diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts index a25d7a157..62a783982 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, + shortDescription: CONFIG.INSTANCE.SHORT_DESCRIPTION, defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE, customizations: { javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT, @@ -85,6 +86,7 @@ function getAbout (req: express.Request, res: express.Response, next: express.Ne const about: About = { instance: { name: CONFIG.INSTANCE.NAME, + shortDescription: CONFIG.INSTANCE.SHORT_DESCRIPTION, description: CONFIG.INSTANCE.DESCRIPTION, terms: CONFIG.INSTANCE.TERMS } @@ -116,8 +118,10 @@ async function updateCustomConfig (req: express.Request, res: express.Response, const toUpdateJSON = omit(toUpdate, 'videoQuota') toUpdateJSON.user['video_quota'] = toUpdate.user.videoQuota toUpdateJSON.instance['default_client_route'] = toUpdate.instance.defaultClientRoute + toUpdateJSON.instance['short_description'] = toUpdate.instance.shortDescription delete toUpdate.user.videoQuota delete toUpdate.instance.defaultClientRoute + delete toUpdate.instance.shortDescription await writeFilePromise(CONFIG.CUSTOM_FILE, JSON.stringify(toUpdateJSON, undefined, 2)) @@ -139,6 +143,7 @@ function customConfig (): CustomConfig { return { instance: { name: CONFIG.INSTANCE.NAME, + shortDescription: CONFIG.INSTANCE.SHORT_DESCRIPTION, description: CONFIG.INSTANCE.DESCRIPTION, terms: CONFIG.INSTANCE.TERMS, defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE, -- cgit v1.2.3