import { getPayload } from 'payload' import configPromise from '../src/payload.config' async function run() { const payload = await getPayload({ config: configPromise }) for (const locale of ['pl', 'de'] as const) { const doc = await payload.findByID({ collection: 'pages', id: 5, locale }) // Filter out faqFull block const newLayout = doc.layout?.filter((b: any) => b.blockType !== 'faqFull') || [] await payload.update({ collection: 'pages', id: 5, locale, data: { layout: newLayout } }) console.log(`[${locale}] Usunięto faqFull z Kontakt (ID 5)`) } process.exit(0) } run()