import { auth } from "@kk/auth";
import { env } from "@kk/env/server";

export async function createContext({ req }: { req: Request }) {
	const session = await auth.api.getSession({
		headers: req.headers,
	});
	return {
		session,
		env,
	};
}

export type Context = Awaited<ReturnType<typeof createContext>>;
