wip fix
This commit is contained in:
parent
dab31e6ab2
commit
c140f98441
|
|
@ -69,10 +69,18 @@ export const fetchViaProxy = async (
|
|||
(Array.isArray(data) && data[0] instanceof File)
|
||||
) {
|
||||
if (data instanceof File) {
|
||||
const res = await fetch(url, { body: data, headers: _headers });
|
||||
const res = await fetch(url, {
|
||||
body: data,
|
||||
method: "POST",
|
||||
headers: _headers,
|
||||
});
|
||||
return await res.text();
|
||||
} else {
|
||||
const res = await fetch(url, { body: data[0], headers: _headers });
|
||||
const res = await fetch(url, {
|
||||
body: data[0],
|
||||
method: "POST",
|
||||
headers: _headers,
|
||||
});
|
||||
return await res.text();
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ export const viLoadSnapshot = async (p: PG) => {
|
|||
try {
|
||||
const apiURL = new URL(api_url);
|
||||
if (api_url && apiURL.hostname) {
|
||||
try {
|
||||
await loadApiProxyDef(api_url, true);
|
||||
|
||||
const api = w.prasiApi[api_url];
|
||||
|
|
@ -39,13 +38,11 @@ export const viLoadSnapshot = async (p: PG) => {
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn("Failed to load API:", api_url);
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
console.log(p.site.code);
|
||||
if (p.site.code.snapshot) {
|
||||
for (const [name, build] of Object.entries(p.site.code.snapshot)) {
|
||||
const doc = new Y.Doc();
|
||||
|
|
|
|||
Loading…
Reference in New Issue