Fix: SW-Cache /api/dogs nach Foto-Upload löschen (SW by-v937)
_renderHund() liest Hunde aus _cachedGet('/dogs') — SW-gecacht mit altem foto_url.
Fix: swCacheDelete für /api/dogs, /api/dogs/{id} + welcome-dashboard, plus w3_dogs.
This commit is contained in:
parent
2b672c89df
commit
e397b9dff5
4 changed files with 9 additions and 3 deletions
|
|
@ -406,7 +406,7 @@ async def serve_media(path: str, request: _Request):
|
||||||
raise _HE(404, "Nicht gefunden.")
|
raise _HE(404, "Nicht gefunden.")
|
||||||
return _media_response(filepath)
|
return _media_response(filepath)
|
||||||
|
|
||||||
APP_VER = "936" # muss mit APP_VER in app.js übereinstimmen
|
APP_VER = "937" # muss mit APP_VER in app.js übereinstimmen
|
||||||
|
|
||||||
@app.get("/.well-known/assetlinks.json")
|
@app.get("/.well-known/assetlinks.json")
|
||||||
async def assetlinks():
|
async def assetlinks():
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
Router, State-Management, Navigation, Initialisierung.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const APP_VER = '936'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
const APP_VER = '937'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||||
const APP_VERSION = '1.5.1'; // ← semantische Version, wird bei make release gesetzt
|
const APP_VERSION = '1.5.1'; // ← semantische Version, wird bei make release gesetzt
|
||||||
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||||
// Cache-Bust-Parameter nach Update-Reload sofort entfernen
|
// Cache-Bust-Parameter nach Update-Reload sofort entfernen
|
||||||
|
|
|
||||||
|
|
@ -772,6 +772,9 @@ window.Page_dog_profile = (() => {
|
||||||
// localStorage + SW-Cache invalidieren
|
// localStorage + SW-Cache invalidieren
|
||||||
const userId2 = _appState.user?.id || 'anon';
|
const userId2 = _appState.user?.id || 'anon';
|
||||||
localStorage.removeItem(`w3_bg3_${userId2}_` + new Date().toISOString().slice(0, 10));
|
localStorage.removeItem(`w3_bg3_${userId2}_` + new Date().toISOString().slice(0, 10));
|
||||||
|
localStorage.removeItem('w3_dogs');
|
||||||
|
API.swCacheDelete('/api/dogs');
|
||||||
|
API.swCacheDelete(`/api/dogs/${dog.id}`);
|
||||||
API.swCacheDelete(`/api/dogs/${dog.id}/welcome-dashboard`);
|
API.swCacheDelete(`/api/dogs/${dog.id}/welcome-dashboard`);
|
||||||
UI.modal.close();
|
UI.modal.close();
|
||||||
App.renderDogSwitcher?.();
|
App.renderDogSwitcher?.();
|
||||||
|
|
@ -1390,6 +1393,9 @@ window.Page_dog_profile = (() => {
|
||||||
// localStorage + SW-Cache invalidieren damit Welten das neue Foto zeigen
|
// localStorage + SW-Cache invalidieren damit Welten das neue Foto zeigen
|
||||||
const userId = _appState.user?.id || 'anon';
|
const userId = _appState.user?.id || 'anon';
|
||||||
localStorage.removeItem(`w3_bg3_${userId}_` + new Date().toISOString().slice(0, 10));
|
localStorage.removeItem(`w3_bg3_${userId}_` + new Date().toISOString().slice(0, 10));
|
||||||
|
localStorage.removeItem('w3_dogs');
|
||||||
|
API.swCacheDelete('/api/dogs');
|
||||||
|
API.swCacheDelete(`/api/dogs/${saved.id}`);
|
||||||
API.swCacheDelete(`/api/dogs/${saved.id}/welcome-dashboard`);
|
API.swCacheDelete(`/api/dogs/${saved.id}/welcome-dashboard`);
|
||||||
} catch {
|
} catch {
|
||||||
UI.toast.warning('Profil gespeichert, Foto konnte nicht hochgeladen werden.');
|
UI.toast.warning('Profil gespeichert, Foto konnte nicht hochgeladen werden.');
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Offline-Cache + Push Notifications + Tile-Cache
|
Offline-Cache + Push Notifications + Tile-Cache
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const CACHE_VERSION = 'by-v936';
|
const CACHE_VERSION = 'by-v937';
|
||||||
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
|
||||||
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue