X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Fapi%2Fconfig.ts;h=9c1b2818c15330fda89457c5e156680df7421baa;hb=05882211077a30e27ebbb79baff0cf8fb87b7ae2;hp=3788975a997c896f7c6321d11ecfc1e596e4e7db;hpb=40e87e9ecc54e3513fb586928330a7855eb192c6;p=github%2FChocobozzz%2FPeerTube.git 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 import { CONFIG, CONSTRAINTS_FIELDS, reloadConfig } from '../../initializers' import { asyncMiddleware, authenticate, ensureUserHasRight } from '../../middlewares' import { customConfigUpdateValidator } from '../../middlewares/validators/config' +import { ClientHtml } from '../../lib/client-html' const packageJSON = require('../../../../package.json') const configRouter = express.Router() @@ -119,6 +120,7 @@ async function deleteCustomConfig (req: express.Request, res: express.Response, await unlinkPromise(CONFIG.CUSTOM_FILE) reloadConfig() + ClientHtml.invalidCache() const data = customConfig() @@ -145,6 +147,7 @@ async function updateCustomConfig (req: express.Request, res: express.Response, await writeFilePromise(CONFIG.CUSTOM_FILE, JSON.stringify(toUpdateJSON, undefined, 2)) reloadConfig() + ClientHtml.invalidCache() const data = customConfig() return res.json(data).end()