initial commit
This commit is contained in:
12
packages/api/src/context.ts
Normal file
12
packages/api/src/context.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { auth } from "@kk/auth";
|
||||
|
||||
export async function createContext({ req }: { req: Request }) {
|
||||
const session = await auth.api.getSession({
|
||||
headers: req.headers,
|
||||
});
|
||||
return {
|
||||
session,
|
||||
};
|
||||
}
|
||||
|
||||
export type Context = Awaited<ReturnType<typeof createContext>>;
|
||||
Reference in New Issue
Block a user