mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2026-02-04 19:04:12 +02:00
hotfix
This commit is contained in:
@@ -11,18 +11,20 @@ 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}
|
||||
}`
|
||||
fetch("/api/Blog", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `Bearer ${melon}`
|
||||
Authorization: `Bearer ${melon}`,
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: {
|
||||
title: $("#titleInput").val(),
|
||||
annotation: $("#annotationArea").val(),
|
||||
text: $("#textArea").val(),
|
||||
image: $("#imgInput").val(),
|
||||
author: melon
|
||||
}
|
||||
body: body
|
||||
}).then(k => console.log(k));
|
||||
$("#titleInput").val('');
|
||||
$("#annotationArea").val('');
|
||||
|
||||
BIN
wwwroot/static/pyVSdotnet.png
Normal file
BIN
wwwroot/static/pyVSdotnet.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
Reference in New Issue
Block a user