diff options
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/config.ts | 3 |
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 | |||
8 | import { CONFIG, CONSTRAINTS_FIELDS, reloadConfig } from '../../initializers' | 8 | import { CONFIG, CONSTRAINTS_FIELDS, reloadConfig } from '../../initializers' |
9 | import { asyncMiddleware, authenticate, ensureUserHasRight } from '../../middlewares' | 9 | import { asyncMiddleware, authenticate, ensureUserHasRight } from '../../middlewares' |
10 | import { customConfigUpdateValidator } from '../../middlewares/validators/config' | 10 | import { customConfigUpdateValidator } from '../../middlewares/validators/config' |
11 | import { ClientHtml } from '../../lib/client-html' | ||
11 | 12 | ||
12 | const packageJSON = require('../../../../package.json') | 13 | const packageJSON = require('../../../../package.json') |
13 | const configRouter = express.Router() | 14 | const 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() |