From 2d3022aa276437642a1c67104f1fb36d0f4c3867 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 23 Jul 2023 23:17:02 +0400 Subject: [PATCH] old-category field is doesn't needed anymore as well. --- web/assets/js/mindflow_admin.js | 1 - web/templates/mindflow_admin.pug | 1 - 2 files changed, 2 deletions(-) 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