mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-06 17:36:28 +00:00
8 lines
300 B
TypeScript
8 lines
300 B
TypeScript
import { NextRequest, NextResponse } from 'next/server'
|
|
import { revalidateTag } from 'next/cache'
|
|
|
|
export async function GET(request: NextRequest) {
|
|
const tag = request.nextUrl.searchParams.get('tag')
|
|
revalidateTag(tag!)
|
|
return NextResponse.json({ revalidated: true, now: Date.now() })
|
|
} |