Fix Wetter-API-Pfad (/api/api/ → /api/), API.weather.get(), SW by-v322

This commit is contained in:
rene 2026-04-24 08:05:44 +02:00
parent d32b802649
commit d72ee6f89f
4 changed files with 4 additions and 3 deletions

View file

@ -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}`); },
};
// ----------------------------------------------------------

View file

@ -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 = (() => {

View file

@ -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 = `<svg class="ph-icon" aria-hidden="true" style="width:12px;height:12px;vertical-align:-2px"><use href="/icons/phosphor.svg#${w.icon}"></use></svg>`;
let zecken = w.zecken_warnung

View file

@ -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