mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 14:06:59 +00:00
Revalidate test
This commit is contained in:
parent
eed1b6b5e7
commit
72135cdb42
@ -2,12 +2,8 @@ import { revalidatePath } from 'next/cache';
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const { searchParams } = new URL(request.url);
|
||||
const slug = searchParams.get('slug');
|
||||
const locale = searchParams.get('locale');
|
||||
|
||||
console.log(request.nextUrl.searchParams)
|
||||
|
||||
revalidatePath(`/${locale}/${slug}`);
|
||||
console.log(request)
|
||||
revalidatePath('/');
|
||||
return NextResponse.json({ revalidated: true, now: Date.now() });
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user