CognxSafeTrack
feat(admin): add Direct Setup button for super admins on orgs without phone number
a3df350 Download apps/api/scratch/list_orgs.ts from safetrack/edtech: direct link, hf CLI and curl.
- Browser
- Download file 568 Bytes
-
https://huggingface.co/spaces/safetrack/edtech/resolve/main/apps/api/scratch/list_orgs.ts
- Command line
-
hf download hf://spaces/safetrack/edtech/apps/api/scratch/list_orgs.ts
-
curl -L -o list_orgs.ts https://huggingface.co/spaces/safetrack/edtech/resolve/main/apps/api/scratch/list_orgs.ts
568 Bytes
| 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); | |