This commit is contained in:
2026-03-12 14:23:32 +01:00
parent d93f43bf01
commit 0084c5f05b
60 changed files with 7526 additions and 7522 deletions

View File

@@ -1,14 +1,14 @@
import { type FetchCreateContextFnOptions } from '@trpc/server/adapters/fetch'
import { auth, getSanitizedHeaders } from '@/lib/auth'
import { prisma } from '@innungsapp/shared'
export async function createContext({ req }: FetchCreateContextFnOptions) {
const session = await auth.api.getSession({ headers: await getSanitizedHeaders(req.headers) })
return {
req,
session,
prisma,
}
}
export type Context = Awaited<ReturnType<typeof createContext>>
import { type FetchCreateContextFnOptions } from '@trpc/server/adapters/fetch'
import { auth, getSanitizedHeaders } from '@/lib/auth'
import { prisma } from '@innungsapp/shared'
export async function createContext({ req }: FetchCreateContextFnOptions) {
const session = await auth.api.getSession({ headers: await getSanitizedHeaders(req.headers) })
return {
req,
session,
prisma,
}
}
export type Context = Awaited<ReturnType<typeof createContext>>

File diff suppressed because it is too large Load Diff