fix bug
This commit is contained in:
parent
47dd30d3b2
commit
8ab9068d8e
@ -29,16 +29,18 @@ export async function signout() {
|
|||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region Remove push notification registration
|
//#region Remove push notification registration
|
||||||
const registration = await navigator.serviceWorker.ready;
|
try {
|
||||||
const push = await registration.pushManager.getSubscription();
|
const registration = await navigator.serviceWorker.ready;
|
||||||
if (!push) return;
|
const push = await registration.pushManager.getSubscription();
|
||||||
await fetch(`${apiUrl}/sw/unregister`, {
|
if (!push) return;
|
||||||
method: 'POST',
|
await fetch(`${apiUrl}/sw/unregister`, {
|
||||||
body: JSON.stringify({
|
method: 'POST',
|
||||||
i: $i.token,
|
body: JSON.stringify({
|
||||||
endpoint: push.endpoint,
|
i: $i.token,
|
||||||
}),
|
endpoint: push.endpoint,
|
||||||
});
|
}),
|
||||||
|
});
|
||||||
|
} catch (e) {}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
document.cookie = `igi=; path=/`;
|
document.cookie = `igi=; path=/`;
|
||||||
|
Loading…
Reference in New Issue
Block a user