From 4bb654bf4d46534acf603dc531a14b2e21364593 Mon Sep 17 00:00:00 2001 From: R40fendt Date: Sun, 4 Jan 2026 18:13:00 +0100 Subject: [PATCH] saveForm-Function macht jetzt einen async fetch (Admin Panel Formulare) --- src/views/adminpanel/Formulare.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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";