Web Development, Typescript, Orm, Full Stack.
'~/server/auth'; export default NextRequestHandler({ // The `enhance` API creates a access-control-enabled wrapper around PrismaClient // The implementation of `getSessionUser` depends on your authentication solution getPrisma: (req, res) => enhance(prisma, { user: getSessionUser(req, res) }) });