diff --git a/lib/constants.ts b/lib/constants.ts new file mode 100644 index 0000000000..52c7fe0a41 --- /dev/null +++ b/lib/constants.ts @@ -0,0 +1 @@ +export const PRISMA_CLIENT_CACHING_TIME = 1000 * 60 * 60 * 24; diff --git a/lib/helpers/customPrisma.ts b/lib/helpers/customPrisma.ts index 27846f3148..dc9bbeeaa3 100644 --- a/lib/helpers/customPrisma.ts +++ b/lib/helpers/customPrisma.ts @@ -2,9 +2,9 @@ import { hash } from "bcryptjs"; import cache from "memory-cache"; import { NextMiddleware } from "next-api-middleware"; +import { PRISMA_CLIENT_CACHING_TIME } from "@calcom/api/lib/constants"; import { prismaAdmin } from "@calcom/console/modules/common/utils/prisma"; import { asStringOrUndefined } from "@calcom/lib/asStringOrNull"; -import { PRISMA_CLIENT_CACHING_TIME } from "@calcom/lib/constants"; import { prisma, customPrisma } from "@calcom/prisma"; // This replaces the prisma client for the cusotm one if the customCredentialsId is valid