| import { PrismaClient } from '@prisma/client' | |
| const prisma = new PrismaClient() | |
| async function main() { | |
| const email = 'admin@example.com' | |
| const user = await prisma.user.findUnique({ | |
| where: { email }, | |
| }) | |
| console.log(`User: ${email}, Role: ${user?.role}`) | |
| } | |
| main() | |
| .then(async () => { | |
| await prisma.$disconnect() | |
| }) | |
| .catch(async (e) => { | |
| console.error(e) | |
| await prisma.$disconnect() | |
| process.exit(1) | |
| }) | |