chore: add remaining db migration and translation scripts
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { getPayload } from 'payload'
|
||||
import configPromise from '../src/payload.config'
|
||||
|
||||
async function run() {
|
||||
const payload = await getPayload({ config: configPromise })
|
||||
const docs = await payload.find({
|
||||
collection: 'pages',
|
||||
where: { slug: { equals: 'uslugi' } }, // wait, slug in DE might be different! Let's query by ID 2
|
||||
locale: 'de'
|
||||
})
|
||||
const doc = docs.docs[0]
|
||||
const cta = doc.layout?.find(b => b.blockType === 'finalCta') as any
|
||||
console.log("USLUGI DE CTA IMAGE:", typeof cta?.image, cta?.image?.id || cta?.image)
|
||||
process.exit(0)
|
||||
}
|
||||
run().catch(console.error)
|
||||
Reference in New Issue
Block a user