hunk.code_window: import prisma from "@calcom/prisma";
   async function handler(req: NextApiRequest, res: NextApiResponse) {
     const t = await getTranslation(req.body.language ?? "en", "common");
     const email = z
       .string()
       .email()
  
hunk.labels: keep keep keep replace replace keep keep keep
hunk.file_path: apps/web/pages/api/auth/forgot-password.ts
hunk.type: replace
file: import type { NextApiRequest } from "next";
  
  import { UserPermissionRole } from "@calcom/prisma/enums";
  
  export const isAdminGuard = async (req: NextApiRequest) => {
    const { userId, prisma } = req;
    const user = await prisma.user.findUnique({ where: { id: userId } });
    return user?.role === UserPermissionRole.ADMIN;
  };
  