aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-03-15 14:31:08 +0100
committerChocobozzz <me@florianbigard.com>2018-03-15 14:34:47 +0100
commit2e3a0215d051dca1f7c8ef423564c8d37a255f77 (patch)
tree9a3c5139f9459fca8a079173f1f522af249cb5f9 /server/controllers/api
parent44a9a76e29aab81e94b528895faa816ccbb09f07 (diff)
downloadPeerTube-2e3a0215d051dca1f7c8ef423564c8d37a255f77.tar.gz
PeerTube-2e3a0215d051dca1f7c8ef423564c8d37a255f77.tar.zst
PeerTube-2e3a0215d051dca1f7c8ef423564c8d37a255f77.zip
Add short description in config
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/config.ts5
1 files changed, 5 insertions, 0 deletions
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
44 const json: ServerConfig = { 44 const json: ServerConfig = {
45 instance: { 45 instance: {
46 name: CONFIG.INSTANCE.NAME, 46 name: CONFIG.INSTANCE.NAME,
47 shortDescription: CONFIG.INSTANCE.SHORT_DESCRIPTION,
47 defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE, 48 defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE,
48 customizations: { 49 customizations: {
49 javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT, 50 javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT,
@@ -85,6 +86,7 @@ function getAbout (req: express.Request, res: express.Response, next: express.Ne
85 const about: About = { 86 const about: About = {
86 instance: { 87 instance: {
87 name: CONFIG.INSTANCE.NAME, 88 name: CONFIG.INSTANCE.NAME,
89 shortDescription: CONFIG.INSTANCE.SHORT_DESCRIPTION,
88 description: CONFIG.INSTANCE.DESCRIPTION, 90 description: CONFIG.INSTANCE.DESCRIPTION,
89 terms: CONFIG.INSTANCE.TERMS 91 terms: CONFIG.INSTANCE.TERMS
90 } 92 }
@@ -116,8 +118,10 @@ async function updateCustomConfig (req: express.Request, res: express.Response,
116 const toUpdateJSON = omit(toUpdate, 'videoQuota') 118 const toUpdateJSON = omit(toUpdate, 'videoQuota')
117 toUpdateJSON.user['video_quota'] = toUpdate.user.videoQuota 119 toUpdateJSON.user['video_quota'] = toUpdate.user.videoQuota
118 toUpdateJSON.instance['default_client_route'] = toUpdate.instance.defaultClientRoute 120 toUpdateJSON.instance['default_client_route'] = toUpdate.instance.defaultClientRoute
121 toUpdateJSON.instance['short_description'] = toUpdate.instance.shortDescription
119 delete toUpdate.user.videoQuota 122 delete toUpdate.user.videoQuota
120 delete toUpdate.instance.defaultClientRoute 123 delete toUpdate.instance.defaultClientRoute
124 delete toUpdate.instance.shortDescription
121 125
122 await writeFilePromise(CONFIG.CUSTOM_FILE, JSON.stringify(toUpdateJSON, undefined, 2)) 126 await writeFilePromise(CONFIG.CUSTOM_FILE, JSON.stringify(toUpdateJSON, undefined, 2))
123 127
@@ -139,6 +143,7 @@ function customConfig (): CustomConfig {
139 return { 143 return {
140 instance: { 144 instance: {
141 name: CONFIG.INSTANCE.NAME, 145 name: CONFIG.INSTANCE.NAME,
146 shortDescription: CONFIG.INSTANCE.SHORT_DESCRIPTION,
142 description: CONFIG.INSTANCE.DESCRIPTION, 147 description: CONFIG.INSTANCE.DESCRIPTION,
143 terms: CONFIG.INSTANCE.TERMS, 148 terms: CONFIG.INSTANCE.TERMS,
144 defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE, 149 defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE,