Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Successful in 54s
Build & Deploy / 🏗️ Build (push) Successful in 2m10s
Build & Deploy / 🚀 Deploy (push) Successful in 14s
Build & Deploy / 🧪 Post-Deploy Verification (push) Failing after 4m43s
Build & Deploy / 🔔 Notify (push) Successful in 2s
26 lines
691 B
TypeScript
26 lines
691 B
TypeScript
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 });
|
|
}
|
|
}
|