From 2769876fb26742f5cc8aa4b761be7bafca97d18d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 17 Mar 2022 09:09:06 +0100 Subject: Fix client html cache on theme update --- shared/server-commands/server/config-command.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'shared/server-commands/server') diff --git a/shared/server-commands/server/config-command.ts b/shared/server-commands/server/config-command.ts index e47a0d346..1dd6e1ea4 100644 --- a/shared/server-commands/server/config-command.ts +++ b/shared/server-commands/server/config-command.ts @@ -123,6 +123,21 @@ export class ConfigCommand extends AbstractCommand { }) } + async getIndexHTMLConfig (options: OverrideCommandOptions = {}) { + const text = await this.getRequestText({ + ...options, + + path: '/', + implicitToken: false, + defaultExpectedStatus: HttpStatusCode.OK_200 + }) + + const match = text.match('') + + // We parse the string twice, first to extract the string and then to extract the JSON + return JSON.parse(JSON.parse(match[1])) as ServerConfig + } + getAbout (options: OverrideCommandOptions = {}) { const path = '/api/v1/config/about' -- cgit v1.2.3