From 825c0267435462c2e0cf04266a4f63c1f7ba262c Mon Sep 17 00:00:00 2001 From: Christopher Date: Thu, 22 Jan 2026 13:53:53 -0800 Subject: [PATCH] Fixed route bug --- src/app/api/posts/[id]/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/api/posts/[id]/route.ts b/src/app/api/posts/[id]/route.ts index fde168e..b213ae0 100644 --- a/src/app/api/posts/[id]/route.ts +++ b/src/app/api/posts/[id]/route.ts @@ -4,10 +4,10 @@ import { eq, desc, and } from 'drizzle-orm'; export async function GET( request: Request, - { params }: { params: { id: string } } + { params }: { params: Promise<{ id: string }> } ) { try { - const { id } = params; + const { id } = await params; // Fetch the main post const post = await db.query.posts.findFirst({