All the pages are working again, but Alpine is insanely frustrating.
This commit is contained in:
parent
81cf5e0d93
commit
7125bc2d2a
15 changed files with 95 additions and 40 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue