Compare commits
5 Commits
v2.3.22-rc
...
24a19adf19
| Author | SHA1 | Date | |
|---|---|---|---|
| 24a19adf19 | |||
| 3313206734 | |||
| ec989690ce | |||
| 37807079cd | |||
| af4213ad59 |
25
app/api/health/fix-avb-now/route.ts
Normal file
25
app/api/health/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 });
|
||||||
|
}
|
||||||
|
}
|
||||||
16
app/health/fix-avb/route.ts
Normal file
16
app/health/fix-avb/route.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import { getPayload } from 'payload'
|
||||||
|
import config from '@payload-config'
|
||||||
|
|
||||||
|
export async function GET() {
|
||||||
|
const payload = await getPayload({ config })
|
||||||
|
|
||||||
|
await payload.update({
|
||||||
|
collection: 'pages',
|
||||||
|
id: 6,
|
||||||
|
data: {
|
||||||
|
excerpt: '',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
return Response.json({ success: true, message: 'AVB excerpt cleared' })
|
||||||
|
}
|
||||||
@@ -22,6 +22,7 @@ async function run() {
|
|||||||
id: 6,
|
id: 6,
|
||||||
data: {
|
data: {
|
||||||
title: 'Allgemeine Verkaufsbedingungen (AVB)',
|
title: 'Allgemeine Verkaufsbedingungen (AVB)',
|
||||||
|
excerpt: '',
|
||||||
content: lexicalContent,
|
content: lexicalContent,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user