import type { Handle } from '@sveltejs/kit';
import { PrismaClientFactory } from './prisma/PrismaClientFactory.js';

export const handle: Handle = async ({ event, resolve }) => {
    const prismaClient = PrismaClientFactory.fromEnv().createClient();
    event.locals.prisma = prismaClient;
    const response = await resolve(event);
    return response;
};
