2023-05-16 14:34:22 +02:00

11 lines
357 B
TypeScript

import { revalidatePath } from 'next/cache';
import { NextRequest, NextResponse } from 'next/server';
export async function GET(request: NextRequest) {
const path = request.nextUrl.searchParams.get('path') || '/';
console.log(request.nextUrl.searchParams)
revalidatePath(path);
return NextResponse.json({ revalidated: true, now: Date.now() });
}