chore: final verification fixes for sitemap reliability

- Replace invalid revalidate export with unstable_cache in sitemap.ts
- Add revalidateTag('sitemap', 'default') to on-demand revalidation endpoint
- Fix test assertions to match /game/ URL path
This commit is contained in:
2026-05-04 13:16:47 +08:00
parent 9d3690ce50
commit 633117f452
3 changed files with 30 additions and 12 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
import { revalidatePath } from "next/cache"
import { revalidatePath, revalidateTag } from "next/cache"
import { NextRequest, NextResponse } from "next/server"
/**
@@ -38,6 +38,7 @@ export async function POST(request: NextRequest): Promise<NextResponse> {
}
try {
revalidateTag("sitemap", "default")
revalidatePath("/sitemap.xml")
return NextResponse.json({
revalidated: true,