aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-07-18 09:52:46 +0200
committerChocobozzz <me@florianbigard.com>2018-07-18 10:00:37 +0200
commite032aec9b92be25a996923361f83a96a89505254 (patch)
tree245b559061fdcb1c27946333ff7ecd6bd82247f7 /server/controllers/api
parent1d94c154689b89b2c5e55f6e12ec25f49b369d52 (diff)
downloadPeerTube-e032aec9b92be25a996923361f83a96a89505254.tar.gz
PeerTube-e032aec9b92be25a996923361f83a96a89505254.tar.zst
PeerTube-e032aec9b92be25a996923361f83a96a89505254.zip
Render CSS/title/description tags on server side
Diffstat (limited to 'server/controllers/api')
-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 3788975a9..9c1b2818c 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -8,6 +8,7 @@ import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/util
8import { CONFIG, CONSTRAINTS_FIELDS, reloadConfig } from '../../initializers' 8import { CONFIG, CONSTRAINTS_FIELDS, reloadConfig } from '../../initializers'
9import { asyncMiddleware, authenticate, ensureUserHasRight } from '../../middlewares' 9import { asyncMiddleware, authenticate, ensureUserHasRight } from '../../middlewares'
10import { customConfigUpdateValidator } from '../../middlewares/validators/config' 10import { customConfigUpdateValidator } from '../../middlewares/validators/config'
11import { ClientHtml } from '../../lib/client-html'
11 12
12const packageJSON = require('../../../../package.json') 13const packageJSON = require('../../../../package.json')
13const configRouter = express.Router() 14const configRouter = express.Router()
@@ -119,6 +120,7 @@ async function deleteCustomConfig (req: express.Request, res: express.Response,
119 await unlinkPromise(CONFIG.CUSTOM_FILE) 120 await unlinkPromise(CONFIG.CUSTOM_FILE)
120 121
121 reloadConfig() 122 reloadConfig()
123 ClientHtml.invalidCache()
122 124
123 const data = customConfig() 125 const data = customConfig()
124 126
@@ -145,6 +147,7 @@ async function updateCustomConfig (req: express.Request, res: express.Response,
145 await writeFilePromise(CONFIG.CUSTOM_FILE, JSON.stringify(toUpdateJSON, undefined, 2)) 147 await writeFilePromise(CONFIG.CUSTOM_FILE, JSON.stringify(toUpdateJSON, undefined, 2))
146 148
147 reloadConfig() 149 reloadConfig()
150 ClientHtml.invalidCache()
148 151
149 const data = customConfig() 152 const data = customConfig()
150 return res.json(data).end() 153 return res.json(data).end()