saveForm-Function macht jetzt einen async fetch (Admin Panel Formulare)
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user