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 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()