From d72ee6f89f77c919c94954a073e4ef9e27756d16 Mon Sep 17 00:00:00 2001 From: rene Date: Fri, 24 Apr 2026 08:05:44 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20Wetter-API-Pfad=20(/api/api/=20=E2=86=92?= =?UTF-8?q?=20/api/),=20API.weather.get(),=20SW=20by-v322?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/static/js/api.js | 1 + backend/static/js/app.js | 2 +- backend/static/js/pages/map.js | 2 +- backend/static/sw.js | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/static/js/api.js b/backend/static/js/api.js index f3b874c..7341740 100644 --- a/backend/static/js/api.js +++ b/backend/static/js/api.js @@ -401,6 +401,7 @@ const API = (() => { // ---------------------------------------------------------- const weather = { alerts(lat, lon) { return get(`/weather/alerts?lat=${lat}&lon=${lon}`); }, + get(lat, lon) { return get(`/weather?lat=${lat}&lon=${lon}`); }, }; // ---------------------------------------------------------- diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 67bf3ab..63e8a57 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '309'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '310'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const App = (() => { diff --git a/backend/static/js/pages/map.js b/backend/static/js/pages/map.js index e23a24e..af09172 100644 --- a/backend/static/js/pages/map.js +++ b/backend/static/js/pages/map.js @@ -1523,7 +1523,7 @@ window.Page_map = (() => { const sep = document.getElementById('map-weather-sep'); if (!info) return; try { - const w = await API.get(`/api/weather?lat=${lat}&lon=${lon}`); + const w = await API.weather.get(lat, lon); const temp = w.temp_c != null ? `${Math.round(w.temp_c)}°` : '–'; const icon = ``; let zecken = w.zecken_warnung diff --git a/backend/static/sw.js b/backend/static/sw.js index ad93f2f..b7d4c54 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -3,7 +3,7 @@ Offline-Cache + Push Notifications + Tile-Cache ============================================================ */ -const CACHE_VERSION = 'by-v321'; +const CACHE_VERSION = 'by-v322'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten