fix wrong unsub logic

This commit is contained in:
2025-05-10 18:27:29 +01:00
parent 515a8e5b21
commit 96866dcbb5
2 changed files with 23 additions and 6 deletions

View File

@@ -52,10 +52,10 @@ async function onButtonClick() {
},
body: JSON.stringify({
subscription: pushSub,
locations: registeredSubscription.locations,
removeLocations: [loc],
})
}).then(jsonOrThrow)
localStorage.setItem(KEY_SUBSCRIPTION, newReg)
localStorage.setItem(KEY_SUBSCRIPTION, JSON.stringify(newReg))
}
getSummaryButton.innerText = "Get daily updates at 7am"
} else {