Quest for Codev2.0.0
/
SIGN IN
next.js/test/development/app-dir/cache-components-tasks/fixtures/without-prefetch-config/app/revalidate/route.ts
route.ts9 lines225 B
import { revalidatePath } from 'next/cache'

export async function GET(request: Request) {
  const path = new URL(request.url).searchParams.get('path')!
  revalidatePath(path)

  return Response.json({ revalidated: true })
}