From 8e936c3fb8ad90052ea2ac67572782b411645bad Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 7 Sep 2025 12:56:31 +0000 Subject: [PATCH] jlj --- markers.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/markers.js b/markers.js index d7199e6..33a8b26 100644 --- a/markers.js +++ b/markers.js @@ -1,14 +1,4 @@ -// markers.js -async function testGateway() { - try { - console.log ("test test"); - 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); - } -} - -// Direkt beim Laden einmal ausführen: -testGateway(); +fetch('/api/places') + .then(r => r.json()) + .then(data => console.log('Gateway-Antwort:', data)) + .catch(err => console.error('Fehler:', err));