import { prisma } from './prisma'; export async function getLegalDocument(type: 'CGU' | 'CGV') { try { return await prisma.legalDocument.findUnique({ where: { type } }); } catch (error) { console.error(`Error fetching ${type}:`, error); return null; } }