import type { Handle } from '@sveltejs/kit'
import { getPool } from '$lib/server/database/pool';
import git from '$lib/server/git';

export const handle: Handle = async ({ event, resolve }) => {
  const pg = getPool;
  event.locals.db = pg;
  event.locals.git = git;

  const result = await resolve(event);
  return result;
}