From 37807079cdb4d8602aacee29ed2c1a5473f20eab Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Tue, 21 Apr 2026 21:47:34 +0200 Subject: [PATCH] chore: add emergency avb fix route --- app/api/fix-avb-now/route.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 app/api/fix-avb-now/route.ts diff --git a/app/api/fix-avb-now/route.ts b/app/api/fix-avb-now/route.ts new file mode 100644 index 00000000..5f88c2b9 --- /dev/null +++ b/app/api/fix-avb-now/route.ts @@ -0,0 +1,25 @@ +import { getPayload } from 'payload'; +import config from '@/payload.config'; +import { NextResponse } from 'next/server'; + +export const dynamic = 'force-dynamic'; + +export async function GET() { + try { + const payload = await getPayload({ config }); + + // Clear the excerpt for page ID 6 + await payload.update({ + collection: 'pages', + id: 6, + data: { + excerpt: '', + }, + }); + + return NextResponse.json({ success: true, message: 'AVB excerpt cleared successfully on production!' }); + } catch (error: any) { + console.error('Error fixing AVB:', error); + return NextResponse.json({ success: false, error: error.message }, { status: 500 }); + } +}