storage permissions

This commit is contained in:
Jan Prochazka
2024-07-30 13:01:34 +02:00
parent 53ee6eacb2
commit b0405855aa
5 changed files with 40 additions and 25 deletions

View File

@@ -42,14 +42,16 @@
const connections = await apiCall('connections/list');
const settings = await getSettings();
const apps = await getUsedApps();
loadedApi = settings && connections && config && apps;
const loadedApiValue = !!(settings && connections && config && apps);
if (loadedApi) {
if (loadedApiValue) {
subscribeApiDependendStores();
subscribeConnectionPingers();
subscribePermissionCompiler();
}
loadedApi = loadedApiValue;
if (!loadedApi) {
console.log('API not initialized correctly, trying again in 1s');
setTimeout(loadApi, 1000);