Spaces:
Sleeping
Sleeping
File size: 332 Bytes
d34aa41 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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>>;
|