wip fix
This commit is contained in:
parent
ea70a7f43b
commit
73ecc7b921
File diff suppressed because one or more lines are too long
|
|
@ -148,7 +148,6 @@ export const apiProxy = (api_url: string) => {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn("Init API failed for URL: ", JSON.stringify(api_url));
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -158,4 +157,3 @@ const fetchSendApi = async (url: string, params: any) => {
|
||||||
"content-type": "application/json",
|
"content-type": "application/json",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -23,7 +23,9 @@ const start = async () => {
|
||||||
await loadApiProxyDef(base_url, false);
|
await loadApiProxyDef(base_url, false);
|
||||||
w._api = apiProxy(base_url);
|
w._api = apiProxy(base_url);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn("Failed to load API:", base_url);
|
if (cur.host) {
|
||||||
|
console.warn("Failed to load API:", base_url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
w.serverurl = base_url;
|
w.serverurl = base_url;
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,13 @@ export const edInitSync = (p: PG) => {
|
||||||
site: params.site_id
|
site: params.site_id
|
||||||
? { id: params.site_id }
|
? { id: params.site_id }
|
||||||
: {
|
: {
|
||||||
id_user: p.user.id,
|
org: {
|
||||||
|
org_user: {
|
||||||
|
some: {
|
||||||
|
id_user: p.user.id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
contains: "root",
|
contains: "root",
|
||||||
|
|
@ -114,10 +120,16 @@ export const edInitSync = (p: PG) => {
|
||||||
site: params.site_id
|
site: params.site_id
|
||||||
? { id: params.site_id }
|
? { id: params.site_id }
|
||||||
: {
|
: {
|
||||||
id_user: p.user.id,
|
org: {
|
||||||
|
org_user: {
|
||||||
|
some: {
|
||||||
|
id_user: p.user.id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
contains: "home",
|
contains: "home",
|
||||||
mode: "insensitive",
|
mode: "insensitive",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -133,7 +145,13 @@ export const edInitSync = (p: PG) => {
|
||||||
site: params.site_id
|
site: params.site_id
|
||||||
? { id: params.site_id }
|
? { id: params.site_id }
|
||||||
: {
|
: {
|
||||||
id_user: p.user.id,
|
org: {
|
||||||
|
org_user: {
|
||||||
|
some: {
|
||||||
|
id_user: p.user.id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
select: { id: true, id_site: true },
|
select: { id: true, id_site: true },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue