Skip to content

Commit

Permalink
fix: prisma logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rharkor committed Mar 19, 2024
1 parent a6418fd commit 9fd51d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions apps/app/src/lib/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ const globalForPrisma = global as unknown as { prisma: PrismaClient }

export const prisma =
globalForPrisma.prisma ||
new PrismaClient({
log: ["warn", "error"],
}).$extends({
new PrismaClient().$extends({
query: {
user: {
async $allOperations({ args, query }) {
Expand Down
4 changes: 1 addition & 3 deletions apps/cron/src/lib/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ const globalForPrisma = global as unknown as { prisma: PrismaClient }

export const prisma =
globalForPrisma.prisma ||
new PrismaClient({
log: ["warn", "error"],
})
new PrismaClient()

if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma

0 comments on commit 9fd51d1

Please sign in to comment.