mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 22:50:51 +00:00
fix(push): remove this browser's subscription on sign-out
Signing out ended the session and wiped the caches but left the Web Push subscription in place, in the browser and on the server. The browser kept showing the signed-out account's medication reminders, also after someone else signed in on it, and the next account's Settings showed push as already on. Sign-out now runs the same steps as "Disable push" before the logout call: DELETE the server row while the session is still valid, then unsubscribe in the browser. Both callers share one helper. A failure there does not block signing out. With the dispatcher no longer counting "no subscription" as a failed send, signing out does not start the five-failure countdown on the account's channel.
This commit is contained in:
1 parent
6d8f533deb
commit
32911fea37
5 files changed
+92
-17
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$comment": "Production functions over 200 lines, keyed \"file :: name\", and their length. Maintained by src/__tests__/source-size-ratchet.test.ts.",
|
||||
"count": 344,
|
||||
"total": 111507,
|
||||
"total": 111493,
|
||||
"entries": {
|
||||
"app/achievements/page.tsx :: AchievementsPage": 206,
|
||||
"app/api/admin/backups/upload/route.ts :: apiHandler(arg)": 275,
|
||||
@@ -224,7 +224,7 @@
|
||||
"components/settings/sharing-section.tsx :: ShareLinksCard": 260,
|
||||
"components/settings/sources-section.tsx :: SourcesSection": 601,
|
||||
"components/settings/thresholds-editor-section.tsx :: MetricRow": 241,
|
||||
"components/settings/web-push-card.tsx :: WebPushCard": 215,
|
||||
"components/settings/web-push-card.tsx :: WebPushCard": 201,
|
||||
"components/symptoms/symptom-entry-form.tsx :: SymptomEntryForm": 317,
|
||||
"components/symptoms/symptoms-section.tsx :: SymptomsSection": 205,
|
||||
"components/targets/range-bar.tsx :: RangeBar": 220,
|
||||
|
||||
Reference in new issue
Block a user