1
0

old-category field is doesn't needed anymore as well.

This commit is contained in:
Alexander Andreev 2023-07-23 23:17:02 +04:00
parent a81375fc34
commit 2d3022aa27
Signed by: Arav
GPG Key ID: D22A817D95815393
2 changed files with 0 additions and 2 deletions

View File

@ -6,7 +6,6 @@ function edit_post(e) {
e.preventDefault(); e.preventDefault();
let data = new URLSearchParams(); let data = new URLSearchParams();
data.append("category", get_field(e.target, "category")) 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("title", get_field(e.target, "title"))
data.append("body", get_field(e.target, "body")) data.append("body", get_field(e.target, "body"))
fetch(`/api/mindflow/${get_field(e.target, "post-id")}`, {method: "PATCH", body: data}) fetch(`/api/mindflow/${get_field(e.target, "post-id")}`, {method: "PATCH", body: data})

View File

@ -54,7 +54,6 @@ block content
else else
option(value=category.ID) #{category.Name} option(value=category.ID) #{category.Name}
input(type='hidden', name='post-id' value=post.ID) 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='') input(type='text', placeholder='Title' name='title' value=post.Title required='')
textarea(placeholder='Body post' name='body' required='')!= post.Body textarea(placeholder='Body post' name='body' required='')!= post.Body
button(name='edit-post') Edit button(name='edit-post') Edit