diff --git a/web/assets/js/mindflow_admin.js b/web/assets/js/mindflow_admin.js index 76ff1d3..bb42cea 100644 --- a/web/assets/js/mindflow_admin.js +++ b/web/assets/js/mindflow_admin.js @@ -6,7 +6,6 @@ function edit_post(e) { e.preventDefault(); let data = new URLSearchParams(); data.append("category", get_field(e.target, "category")) - data.append("old-category", get_field(e.target, "old-category")) data.append("title", get_field(e.target, "title")) data.append("body", get_field(e.target, "body")) fetch(`/api/mindflow/${get_field(e.target, "post-id")}`, {method: "PATCH", body: data}) diff --git a/web/templates/mindflow_admin.pug b/web/templates/mindflow_admin.pug index 3bcc66b..e68f959 100755 --- a/web/templates/mindflow_admin.pug +++ b/web/templates/mindflow_admin.pug @@ -54,7 +54,6 @@ block content else option(value=category.ID) #{category.Name} input(type='hidden', name='post-id' value=post.ID) - input(type='hidden', name='old-category' value=post.Category.ID) input(type='text', placeholder='Title' name='title' value=post.Title required='') textarea(placeholder='Body post' name='body' required='')!= post.Body button(name='edit-post') Edit