Fixed route bug
This commit is contained in:
@@ -4,10 +4,10 @@ import { eq, desc, and } from 'drizzle-orm';
|
|||||||
|
|
||||||
export async function GET(
|
export async function GET(
|
||||||
request: Request,
|
request: Request,
|
||||||
{ params }: { params: { id: string } }
|
{ params }: { params: Promise<{ id: string }> }
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const { id } = params;
|
const { id } = await params;
|
||||||
|
|
||||||
// Fetch the main post
|
// Fetch the main post
|
||||||
const post = await db.query.posts.findFirst({
|
const post = await db.query.posts.findFirst({
|
||||||
|
|||||||
Reference in New Issue
Block a user