From 69ce35e03e2b2fe89f716b8255ae41d8aba4f858 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 7 Sep 2025 12:51:50 +0000 Subject: [PATCH] markers data test --- markers.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) 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();