This commit is contained in:
2024-02-22 13:57:05 +01:00
parent c74feeb8cd
commit 4b288b48c8
5 changed files with 73 additions and 24 deletions

View File

@@ -179,16 +179,24 @@ async function togglearticlecreate(){
articleContainerElement.classList.toggle("hidden");
}
async function renderarticle(articledata){
}
async function submitarticle(){
let articleTitleElement = document.getElementById("articletitleinput");
let articleBodyElement = document.getElementById("articlebodyinput");
await doAction("/newsarticle", {
action: "addNewsArticle",
title: articleTitleElement.value,
body: articleBodyElement.value
}, "Článok úspešne pridaný",
await doAction(
"/newsarticle",
{
action: "addNewsArticle",
title: articleTitleElement.value,
body: articleBodyElement.value
},
"Článok úspešne pridaný",
"Nastala chyba pri pridávaní článku",
false);
false
);
}
async function articleInit(){