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:
parent
52fe4b671a
commit
2769876fb2
5 changed files with 87 additions and 52 deletions
|
@ -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'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue