carnet route

This commit is contained in:
alma 2025-04-20 16:01:49 +02:00
parent 580cc20c5c
commit 605a2863f2
2 changed files with 2 additions and 9 deletions

View File

@ -4,14 +4,7 @@ import { authOptions } from '@/app/api/auth/[...nextauth]/route';
import { DOMParser } from '@xmldom/xmldom';
import { Buffer } from 'buffer';
import { PrismaClient } from '@prisma/client';
// Use a single PrismaClient instance
declare global {
var prisma: PrismaClient | undefined;
}
const prisma = global.prisma || new PrismaClient();
if (process.env.NODE_ENV !== 'production') global.prisma = prisma;
import { prisma } from '@/lib/prisma';
// Cache for folder structure and credentials
const folderCache = new Map<string, { folders: string[]; timestamp: number }>();

View File

@ -18,6 +18,6 @@ export const prisma =
log: ['query'],
})
if (env.NODE_ENV !== 'production') {
if (process.env.NODE_ENV !== 'production') {
globalForPrisma.prisma = prisma;
}