All the pages are working again, but Alpine is insanely frustrating.

This commit is contained in:
Zed A. Shaw 2025-08-02 13:56:39 -04:00
parent 81cf5e0d93
commit 7125bc2d2a
15 changed files with 95 additions and 40 deletions

View file

@ -37,6 +37,10 @@ class GetJson {
this.url = url;
}
get item() {
return this.item;
}
async item() {
const resp = await fetch(`${this.url}`);
console.assert(resp.status == 200, "failed to get it");
@ -48,9 +52,9 @@ class GetJson {
const ConfirmDelete = async (table, obj_id) => {
if(confirm("Are you sure?")) {
await fetch("/api/admin/table/" + table + "/" + obj_id + "/",
await fetch("/api/admin/table/" + table + "/" + obj_id,
{ method: "DELETE" });
window.location = "/admin/table/" + table + "/";
window.location = "/admin/table/" + table;
} else {
return false;
}