From f893043b00750ad693fc886eb77184598b9c8317 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 17 Sep 2024 20:29:53 -0700 Subject: account deletion --- src/routes/(app)/account/[id]/+page.server.ts | 8 ++++++- src/routes/(app)/account/[id]/+page.svelte | 34 ++++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 4 deletions(-) (limited to 'src/routes/(app)/account') diff --git a/src/routes/(app)/account/[id]/+page.server.ts b/src/routes/(app)/account/[id]/+page.server.ts index 7d1c503a..35b5517d 100644 --- a/src/routes/(app)/account/[id]/+page.server.ts +++ b/src/routes/(app)/account/[id]/+page.server.ts @@ -1,5 +1,11 @@ import { error, redirect } from "@sveltejs/kit"; -import { auth, post, fd } from "$lib/utils"; +import { auth, get, post, fd } from "$lib/utils"; + + +export let load = async ({ cookies, params }) => { + let account = await get(`/account/${params.id}`, auth(cookies)); + return { account }; +} export const actions = { default: async ({ cookies, params, request }) => { diff --git a/src/routes/(app)/account/[id]/+page.svelte b/src/routes/(app)/account/[id]/+page.svelte index 152e8dfc..df121168 100644 --- a/src/routes/(app)/account/[id]/+page.svelte +++ b/src/routes/(app)/account/[id]/+page.svelte @@ -1,8 +1,22 @@
@@ -12,10 +26,24 @@
- +
- +
+ + +
-- cgit v1.2.3