1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-18 10:33:11 +02:00

Remove webPushEndpoint from indexeddb

Rely directly on getting it from the browser
This commit is contained in:
nimbleghost 2023-05-31 21:08:46 +02:00
parent 7aa3d8f59b
commit 4944e3ae4b
3 changed files with 28 additions and 32 deletions
web/src/app

View file

@ -134,7 +134,7 @@ class Api {
throw new Error(`Unexpected server response ${response.status}`);
}
async unsubscribeWebPush(subscription) {
async unsubscribeWebPush(subscription, browserSubscription) {
const user = await userManager.get(subscription.baseUrl);
const url = topicUrlWebPushUnsubscribe(subscription.baseUrl, subscription.topic);
@ -144,7 +144,7 @@ class Api {
method: "POST",
headers: maybeWithAuth({}, user),
body: JSON.stringify({
endpoint: subscription.webPushEndpoint,
endpoint: browserSubscription.endpoint,
}),
});