mirror of
https://github.com/ArthurDanjou/website.git
synced 2026-01-14 12:14:42 +01:00
Change prisma log
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { PrismaClient } from '@prisma/client'
|
||||
import type { inferAsyncReturnType } from '@trpc/server'
|
||||
import type { H3Event } from 'h3'
|
||||
import { PrismaClient } from '@prisma/client'
|
||||
|
||||
let prisma: PrismaClient | undefined
|
||||
|
||||
export function createContext(_event: H3Event) {
|
||||
if (!prisma) {
|
||||
prisma = new PrismaClient({
|
||||
log: process.env.NODE_ENV === 'development' ? ['query', 'error', 'warn'] : ['error'],
|
||||
log: ['warn', 'info', 'error'],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user