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) {
|
||||
console.warn("Init API failed for URL: ", JSON.stringify(api_url));
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
|
@ -158,4 +157,3 @@ const fetchSendApi = async (url: string, params: any) => {
|
|||
"content-type": "application/json",
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -23,7 +23,9 @@ const start = async () => {
|
|||
await loadApiProxyDef(base_url, false);
|
||||
w._api = apiProxy(base_url);
|
||||
} 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;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,13 @@ export const edInitSync = (p: PG) => {
|
|||
site: params.site_id
|
||||
? { id: params.site_id }
|
||||
: {
|
||||
id_user: p.user.id,
|
||||
org: {
|
||||
org_user: {
|
||||
some: {
|
||||
id_user: p.user.id,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
name: {
|
||||
contains: "root",
|
||||
|
|
@ -114,10 +120,16 @@ export const edInitSync = (p: PG) => {
|
|||
site: params.site_id
|
||||
? { id: params.site_id }
|
||||
: {
|
||||
id_user: p.user.id,
|
||||
org: {
|
||||
org_user: {
|
||||
some: {
|
||||
id_user: p.user.id,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
name: {
|
||||
contains: "home",
|
||||
contains: "home",
|
||||
mode: "insensitive",
|
||||
},
|
||||
},
|
||||
|
|
@ -133,7 +145,13 @@ export const edInitSync = (p: PG) => {
|
|||
site: 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 },
|
||||
|
|
|
|||
Loading…
Reference in New Issue