1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Fix client html cache on theme update

This commit is contained in:
Chocobozzz 2022-03-17 09:09:06 +01:00
parent 52fe4b671a
commit 2769876fb2
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 87 additions and 52 deletions

View file

@ -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('<script type="application/javascript">window.PeerTubeServerConfig = (".+?")</script>')
// 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'