In mindflow_admin.js changed mindflow category api path to a new one.
This commit is contained in:
parent
7180b7f35e
commit
5f1724679d
@ -32,7 +32,7 @@ document.getElementById("manage-categories").elements["add"].addEventListener("c
|
||||
ev.preventDefault();
|
||||
let data = new URLSearchParams();
|
||||
data.append("name", get_field(ev.target, "name"));
|
||||
fetch(`/api/mindflow-category`, {method: "POST", body: data})
|
||||
fetch(`/api/mindflow/category`, {method: "POST", body: data})
|
||||
.catch(e => console.log(e))
|
||||
.then(() => window.location = "/mindflow/admin");
|
||||
});
|
||||
@ -41,14 +41,14 @@ document.getElementById("manage-categories").elements["edit"].addEventListener("
|
||||
ev.preventDefault();
|
||||
let data = new URLSearchParams();
|
||||
data.append("name", get_field(ev.target, "name"));
|
||||
fetch(`/api/mindflow-category/${get_field(ev.target, "category")}`, {method: "PATCH", body: data})
|
||||
fetch(`/api/mindflow/category/${get_field(ev.target, "category")}`, {method: "PATCH", body: data})
|
||||
.catch(e => console.log(e))
|
||||
.then(() => window.location = "/mindflow/admin");
|
||||
});
|
||||
|
||||
document.getElementById("manage-categories").elements["delete"].addEventListener("click", ev => {
|
||||
ev.preventDefault();
|
||||
fetch(`/api/mindflow-category/${get_field(ev.target, "category")}`, {method: "DELETE"})
|
||||
fetch(`/api/mindflow/category/${get_field(ev.target, "category")}`, {method: "DELETE"})
|
||||
.catch(e => console.log(e))
|
||||
.then(() => window.location = "/mindflow/admin");
|
||||
});
|
Loading…
Reference in New Issue
Block a user