diff --git a/webui/public/index.html b/webui/public/index.html index 708cc63..7892e4d 100644 --- a/webui/public/index.html +++ b/webui/public/index.html @@ -6,10 +6,10 @@ UpEnd - - + + - + diff --git a/webui/src/components/AddModal.svelte b/webui/src/components/AddModal.svelte index c3f6386..9d69b78 100644 --- a/webui/src/components/AddModal.svelte +++ b/webui/src/components/AddModal.svelte @@ -34,7 +34,7 @@ const formData = new FormData(); formData.append("file", file); - const response = await fetch("/api/obj", { + const response = await fetch("api/obj", { method: "PUT", body: formData, }); diff --git a/webui/src/components/Inspect.svelte b/webui/src/components/Inspect.svelte index ec2a025..78211c7 100644 --- a/webui/src/components/Inspect.svelte +++ b/webui/src/components/Inspect.svelte @@ -108,7 +108,7 @@ const change = ev.detail; switch (change.type) { case "create": - await fetch(`/api/obj`, { + await fetch(`api/obj`, { method: "PUT", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ @@ -119,10 +119,10 @@ }); break; case "delete": - await fetch(`/api/obj/${change.address}`, { method: "DELETE" }); + await fetch(`api/obj/${change.address}`, { method: "DELETE" }); break; case "update": - await fetch(`/api/obj/${address}/${change.attribute}`, { + await fetch(`api/obj/${address}/${change.attribute}`, { method: "PUT", headers: { "Content-Type": "application/json" }, body: JSON.stringify(change.value), @@ -140,7 +140,7 @@ if (!groupToAdd) { return; } - await fetch(`/api/obj`, { + await fetch(`api/obj`, { method: "PUT", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ @@ -157,12 +157,12 @@ } async function removeGroup(address: string) { - await fetch(`/api/obj/${address}`, { method: "DELETE" }); + await fetch(`api/obj/${address}`, { method: "DELETE" }); revalidate(); } onMount(() => { - fetch(`/api/obj/${address}/LAST_VISITED`, { + fetch(`api/obj/${address}/LAST_VISITED`, { method: "PUT", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ t: "Number", c: new Date().getTime() }), diff --git a/webui/src/components/display/BlobPreview.svelte b/webui/src/components/display/BlobPreview.svelte index 8574116..3c1bd77 100644 --- a/webui/src/components/display/BlobPreview.svelte +++ b/webui/src/components/display/BlobPreview.svelte @@ -35,19 +35,19 @@ {/if} {address} (imageLoaded = address)} on:error={() => (imageLoaded = address)} /> -