13 lines
283 B
TypeScript
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;
|
|
}
|
|
}
|