Fix AdminPanel json

This commit is contained in:
Дмитрий Шиманский
2023-12-22 21:36:21 +03:00
parent ede506cb5d
commit b91582a374
3 changed files with 10 additions and 9 deletions

View File

@@ -12,11 +12,11 @@ function updateAnnotation(value) {
function sendArticleData () {
let melon = document.cookie.split(';')[0].replace("melon=", "");
let body = `{
title: ${$("#titleInput").val()},
annotation: ${$("#annotationArea").val()},
text: ${$("#textArea").val()},
image: ${$("#imgInput").val()},
author: ${melon}
title: "${$("#titleInput").val()}",
annotation: "${$("#annotationArea").val()}",
text: "${$("#textArea").val()}",
image: "${$("#imgInput").val()}",
author: "${melon}"
}`
fetch("/api/Blog", {
method: "POST",