From a8b94ffeb83a033ecdc76d892f7edc0cc65ba662 Mon Sep 17 00:00:00 2001 From: Gautham Krishna Date: Thu, 19 Oct 2023 22:18:02 +0530 Subject: [PATCH] making postpage work --- src/routes/post/[slug]/+page.server.ts | 1 + src/routes/post/[slug]/+page.svelte | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/routes/post/[slug]/+page.server.ts b/src/routes/post/[slug]/+page.server.ts index fdcb03b..04e5b2d 100644 --- a/src/routes/post/[slug]/+page.server.ts +++ b/src/routes/post/[slug]/+page.server.ts @@ -7,6 +7,7 @@ export async function load({ params, locals }) { ) { if (locals && locals.user) { const res = await api.get_post(params.slug); + console.log(res); if (res.error) { // throwing error for user not found throw error(400, 'Post Not Found'); diff --git a/src/routes/post/[slug]/+page.svelte b/src/routes/post/[slug]/+page.svelte index a9e86cd..f2d94f4 100644 --- a/src/routes/post/[slug]/+page.svelte +++ b/src/routes/post/[slug]/+page.svelte @@ -1,4 +1,8 @@ + + +