15 lines
427 B
TypeScript
15 lines
427 B
TypeScript
import { getPayload } from 'payload';
|
|
import configPromise from '../payload.config';
|
|
|
|
async function main() {
|
|
const payload = await getPayload({ config: configPromise });
|
|
const result = await payload.find({
|
|
collection: 'pages',
|
|
where: { slug: { equals: 'start' } },
|
|
locale: 'de',
|
|
depth: 2,
|
|
});
|
|
console.log(JSON.stringify(result.docs[0], null, 2));
|
|
}
|
|
main().catch(console.error);
|