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({