File size: 568 Bytes
a3df350 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import 'dotenv/config';
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
const orgs = await prisma.organization.findMany({
select: { id: true, name: true, slug: true, wabaId: true },
orderBy: { createdAt: 'desc' }
});
console.log('\n📋 Organisations disponibles :');
orgs.forEach(o => {
console.log(` - [${o.id}] ${o.name} (slug: ${o.slug || 'aucun'}, waba: ${o.wabaId || 'non configuré'})`);
});
await prisma.$disconnect();
}
main().catch(console.error);
|