From 2f01e6bf8211fc484e23acabb4a9668173219402 Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Mon, 2 Oct 2023 16:57:48 -0700 Subject: [PATCH] feat: add content deletion when deleting account --- .../profile/(local_user)/settings/+page.svelte | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/routes/profile/(local_user)/settings/+page.svelte b/src/routes/profile/(local_user)/settings/+page.svelte index 55043d3f..76073435 100644 --- a/src/routes/profile/(local_user)/settings/+page.svelte +++ b/src/routes/profile/(local_user)/settings/+page.svelte @@ -55,6 +55,7 @@ let deletion = { modal: false, password: '', + deleteContent: false, } async function deleteAccount(level: number) { @@ -101,12 +102,10 @@ }) try { - const { jwt } = $profile - - // TODO - add option to delete content await getClient().deleteAccount({ password: deletion.password, - delete_content: false, + + delete_content: deletion.deleteContent, }) profileData.update((pd) => { @@ -148,6 +147,12 @@ type="password" bind:value={deletion.password} /> + + Delete content + + This will delete ALL of your account's posts and comments. + + {/if}