diff --git a/app/api/revalidate/route.ts b/app/api/revalidate/route.ts index 7e331d5d9..cd84e00ba 100644 --- a/app/api/revalidate/route.ts +++ b/app/api/revalidate/route.ts @@ -2,10 +2,12 @@ import { revalidatePath } from 'next/cache'; import { NextRequest, NextResponse } from 'next/server'; export async function GET(request: NextRequest) { - const path = request.nextUrl.searchParams.get('path') || '/'; + const { searchParams } = new URL(request.url); + const slug = searchParams.get('slug'); + const locale = searchParams.get('locale'); console.log(request.nextUrl.searchParams) - revalidatePath(path); + revalidatePath(`/${locale}/${slug}`); return NextResponse.json({ revalidated: true, now: Date.now() }); } \ No newline at end of file