mirror of
https://github.com/ArthurDanjou/website.git
synced 2026-01-26 09:50:31 +01:00
first commit
This commit is contained in:
11
src/server/trpc/context.ts
Normal file
11
src/server/trpc/context.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { inferAsyncReturnType } from '@trpc/server'
|
||||
import type { H3Event } from 'h3'
|
||||
import { prisma } from '~/server/prisma'
|
||||
|
||||
export function createContext(_event: H3Event) {
|
||||
return {
|
||||
prisma,
|
||||
}
|
||||
}
|
||||
|
||||
export type Context = inferAsyncReturnType<typeof createContext>
|
||||
Reference in New Issue
Block a user