This commit is contained in:
2025-09-03 12:19:38 -03:00
commit 08a5e16e4b
83 changed files with 12223 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import type { Context as HonoContext } from "hono";
import { auth } from "./auth";
export type CreateContextOptions = {
context: HonoContext;
};
export async function createContext({ context }: CreateContextOptions) {
const session = await auth.api.getSession({
headers: context.req.raw.headers,
});
return {
session,
};
}
export type Context = Awaited<ReturnType<typeof createContext>>;