feat(#55): Enable deleting account and anonymising purchases and subscriptions (no email sending)

This commit is contained in:
Josh Creek
2024-10-29 21:20:23 +00:00
parent 90875517da
commit 33409bc375
6 changed files with 177 additions and 6 deletions
+16
View File
@@ -26,6 +26,16 @@
update();
};
};
const handleAccountDeletion: SubmitFunction = () => {
loading = true;
if (session.user && session.user.email) {
alert('Check your email to confirm account deletion.');
}
return async () => {
loading = false;
};
};
</script>
<div class="form-widget">
@@ -56,4 +66,10 @@
<button class="button block" disabled={loading}>Sign Out</button>
</div>
</form>
<form method="post" action="?/delete" use:enhance={handleAccountDeletion}>
<div>
<button class="button block" disabled={loading}>Delete My Account</button>
</div>
</form>
</div>