diff --git a/src/views/adminpanel/Formulare.vue b/src/views/adminpanel/Formulare.vue index 907afe5..5187e27 100644 --- a/src/views/adminpanel/Formulare.vue +++ b/src/views/adminpanel/Formulare.vue @@ -14,8 +14,15 @@ RitzenbergenLib.Formular.getForms().then( (result) => (formulare.value = result) ); -function saveForm(form) { - console.log(form); +async function saveForm(form) { + return fetch(RitzenbergenLib.RitzenbergenLib.api("/admin/formulare/updateForm.php"),{ + method: "POST", + body: JSON.stringify(form), + headers: { + "Content-Type":"application/json", + "Authorization":"Bearer "+token.value + } + }) } function filterType(type: string) { if (type in ["radio", "checkbox"]) return "text";