15 lines
416 B
JavaScript
15 lines
416 B
JavaScript
import { getPayload } from 'payload';
|
|
import configPromise from '@payload-config';
|
|
|
|
async function run() {
|
|
const payload = await getPayload({ config: configPromise });
|
|
const existing = await payload.find({
|
|
collection: 'pages',
|
|
where: { slug: { equals: 'start' } },
|
|
limit: 1,
|
|
});
|
|
console.log('Homepage blocks found:', existing.docs[0].content?.root?.children?.length);
|
|
process.exit(0);
|
|
}
|
|
run();
|