chore: add emergency avb fix route
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
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
This commit is contained in:
25
app/api/fix-avb-now/route.ts
Normal file
25
app/api/fix-avb-now/route.ts
Normal file
@@ -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 });
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user