skip caches for config

This commit is contained in:
Dan Percic 2023-08-17 15:32:14 +03:00
parent 6ec1bc3740
commit 5af2141f7b

View File

@ -34,8 +34,9 @@ async function bootstrap(appConfig: AppConfig, version: { FRONTEND_APP_VERSION:
}
}
const versionPromise = fetch('/ui/assets/version/version.json').then(resp => resp.json());
const configPromise = fetch('/ui/assets/config/config.json').then(resp => resp.json());
const randomNr = Math.random().toFixed(2);
const versionPromise = fetch(`/ui/assets/version/version.json?skipCache=${randomNr}`).then(resp => resp.json());
const configPromise = fetch(`/ui/assets/config/config.json?skipCache=${randomNr}`).then(resp => resp.json());
Promise.all([configPromise, versionPromise])
.then(([appConfig, version]) => bootstrap(appConfig, version))