diff --git a/markers.js b/markers.js index ea5a3f4..caa07bf 100644 --- a/markers.js +++ b/markers.js @@ -1,14 +1,13 @@ -const url = "https://data.arenos.danielnagel.at/api/docs/rp78Zashtzfe7mgFSbeMkd"; -const apiKey = "77fc2fdb0b54a27e4da954a077a670e67f45b203"; - -async function main() { - const response = await fetch(url, { - headers: { - "Authorization": `Bearer ${apiKey}` - } - }); - const json = await response.json(); - console.log(json); +// markers.js +async function testGateway() { + try { + const res = await fetch("/api/places"); // Edge-Caddy proxyt zu data_gateway + const data = await res.json(); + console.log("Antwort vom Gateway:", data); + } catch (err) { + console.error("Fehler:", err); + } } -main(); \ No newline at end of file +// Direkt beim Laden einmal ausführen: +testGateway();