Files
afrov2/lib/legal.ts
2026-04-18 22:10:19 +02:00

13 lines
283 B
TypeScript

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;
}
}