debug mapado check button

This commit is contained in:
isUnknown 2024-09-04 14:05:22 +02:00
parent 646c5ab65f
commit 99395b994f
5 changed files with 37 additions and 133 deletions

View file

@ -54,21 +54,19 @@ function connect() {
icon.value = "loader";
theme.value = "yellow";
const myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer " + mapadoToken);
const requestUrl =
"https://ticketing.mapado.net/v1/ticketings/" +
id.value +
"?fields=id,title,slug,sellingDeviceSchedule";
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow",
method: "POST",
body: JSON.stringify({
requestUrl,
}),
};
fetch(
"https://ticketing.mapado.net/v1/ticketings/" +
id.value +
"?fields=id,title,slug,sellingDeviceSchedule",
requestOptions
)
fetch("/mapado-fetch.json", requestOptions)
.then((response) => {
console.log(response);
if (response.status === 404) {
@ -98,7 +96,6 @@ function connect() {
theme.value = "red";
text.value = "<strong>" + error + "</strong>";
console.log(error);
setTimeout(() => {
icon.value = "search";
theme.value = null;