Spaces:
Sleeping
Sleeping
| import { auth } from '@/lib/auth'; | |
| import { prisma } from '@/lib/prisma'; | |
| import { getRedis } from '@/lib/redis'; | |
| export async function createTRPCContext() { | |
| const session = await auth(); | |
| return { | |
| prisma, | |
| redis: getRedis(), | |
| session, | |
| }; | |
| } | |
| export type TRPCContext = Awaited<ReturnType<typeof createTRPCContext>>; | |