2023-09-14 12:57:45 +00:00
|
|
|
import { ssoTenantProduct } from "@calcom/features/ee/sso/lib/sso";
|
2023-08-24 09:14:10 +00:00
|
|
|
import type { PrismaClient } from "@calcom/prisma";
|
2023-04-25 22:39:47 +00:00
|
|
|
|
|
|
|
import type { TSamlTenantProductInputSchema } from "./samlTenantProduct.schema";
|
|
|
|
|
|
|
|
type SamlTenantProductOptions = {
|
|
|
|
ctx: {
|
2023-05-09 19:27:05 +00:00
|
|
|
prisma: PrismaClient;
|
2023-04-25 22:39:47 +00:00
|
|
|
};
|
|
|
|
input: TSamlTenantProductInputSchema;
|
|
|
|
};
|
|
|
|
|
2023-05-09 19:27:05 +00:00
|
|
|
export const samlTenantProductHandler = ({ ctx, input }: SamlTenantProductOptions) => {
|
|
|
|
const { prisma } = ctx;
|
2023-04-25 22:39:47 +00:00
|
|
|
const { email } = input;
|
|
|
|
|
2023-09-14 12:57:45 +00:00
|
|
|
return ssoTenantProduct(prisma, email);
|
2023-04-25 22:39:47 +00:00
|
|
|
};
|
2023-08-24 10:19:24 +00:00
|
|
|
|
|
|
|
export default samlTenantProductHandler;
|