Fix Wetter-API-Pfad (/api/api/ → /api/), API.weather.get(), SW by-v322
This commit is contained in:
parent
d32b802649
commit
d72ee6f89f
4 changed files with 4 additions and 3 deletions
|
|
@ -401,6 +401,7 @@ const API = (() => {
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
const weather = {
|
const weather = {
|
||||||
alerts(lat, lon) { return get(`/weather/alerts?lat=${lat}&lon=${lon}`); },
|
alerts(lat, lon) { return get(`/weather/alerts?lat=${lat}&lon=${lon}`); },
|
||||||
|
get(lat, lon) { return get(`/weather?lat=${lat}&lon=${lon}`); },
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
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 = (() => {
|
const App = (() => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1523,7 +1523,7 @@ window.Page_map = (() => {
|
||||||
const sep = document.getElementById('map-weather-sep');
|
const sep = document.getElementById('map-weather-sep');
|
||||||
if (!info) return;
|
if (!info) return;
|
||||||
try {
|
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 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>`;
|
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
|
let zecken = w.zecken_warnung
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Offline-Cache + Push Notifications + Tile-Cache
|
Offline-Cache + Push Notifications + Tile-Cache
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const CACHE_VERSION = 'by-v321';
|
const CACHE_VERSION = 'by-v322';
|
||||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue