Fix: SW-Cache welcome-dashboard nach Foto-Upload löschen (SW by-v935)
Root cause: /api/dogs/{id}/welcome-dashboard ist SW-gecacht.
Nach Foto-Upload lieferte SW alten Response mit alter random_photo.url.
Fix: API.swCacheDelete() + localStorage-Key nach Upload invalidieren.
This commit is contained in:
parent
aa379d8e08
commit
fbb070032a
5 changed files with 17 additions and 8 deletions
|
|
@ -800,9 +800,17 @@ const API = (() => {
|
|||
get(`/osm/pois?type=${type}&south=${south}&west=${west}&north=${north}&east=${east}&fast=true`),
|
||||
};
|
||||
|
||||
// SW-Cache-Einträge für eine URL löschen (z.B. nach Foto-Upload)
|
||||
async function swCacheDelete(path) {
|
||||
try {
|
||||
const c = await caches.open('ban-yaro-api-v1');
|
||||
await c.delete(new Request(path));
|
||||
} catch {}
|
||||
}
|
||||
|
||||
// Öffentliche API
|
||||
return {
|
||||
get, post, put, patch, del, upload,
|
||||
get, post, put, patch, del, upload, swCacheDelete,
|
||||
auth, dogs, diary, health, tieraerzte, healthDocs, poison,
|
||||
places, routes, walks, events, sitting, forum, lost, knigge, weather, push,
|
||||
friends, chat, webcal, importData, sharing, widget, notifications, services, ratings, sittingAccess, training, notes,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue