feat: CMS com limites de caracteres, traduções auto e painel de notificações
This commit is contained in:
23
frontend/prisma/check-translations.mjs
Normal file
23
frontend/prisma/check-translations.mjs
Normal file
@@ -0,0 +1,23 @@
|
||||
import { PrismaClient } from '@prisma/client'
|
||||
|
||||
const prisma = new PrismaClient()
|
||||
|
||||
async function check() {
|
||||
const pages = await prisma.pageContent.findMany({
|
||||
where: { slug: 'home' },
|
||||
orderBy: { locale: 'asc' }
|
||||
})
|
||||
|
||||
console.log('\n=== VERSÕES DA PÁGINA HOME ===\n')
|
||||
|
||||
for (const page of pages) {
|
||||
const content = typeof page.content === 'string' ? JSON.parse(page.content) : page.content
|
||||
console.log(`[${page.locale.toUpperCase()}] Hero title: ${content.hero?.title?.substring(0, 70)}...`)
|
||||
console.log(` Atualizado: ${page.updatedAt}`)
|
||||
console.log('')
|
||||
}
|
||||
|
||||
await prisma.$disconnect()
|
||||
}
|
||||
|
||||
check().catch(console.error)
|
||||
Reference in New Issue
Block a user