2
0

🔊 more

This commit is contained in:
Baptiste Arnaud
2024-04-17 11:43:27 +02:00
parent 7e1d5100dd
commit 4980a274f7

View File

@@ -6,12 +6,12 @@ let prisma: PrismaClient
if (env.NODE_ENV === 'production' && !process.versions.bun) { if (env.NODE_ENV === 'production' && !process.versions.bun) {
prisma = new PrismaClient({ prisma = new PrismaClient({
log: ['info', 'warn', 'error'], log: ['info', 'warn', 'error', 'query'],
}) })
} else { } else {
if (!global.prisma) { if (!global.prisma) {
global.prisma = new PrismaClient({ global.prisma = new PrismaClient({
log: ['info', 'warn', 'error'], log: ['info', 'warn', 'error', 'query'],
}) })
} }
prisma = global.prisma prisma = global.prisma