Scheduling infrastructure for absolutely everyone.
Fixes
zomarse15f6abc9b17
diff --git a/lib/helpers/customPrisma.ts b/lib/helpers/customPrisma.tsindex f3740484998..255ddc509ae 100644--- a/lib/helpers/customPrisma.ts+++ b/lib/helpers/customPrisma.ts@@ -2,10 +2,11 @@ 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 { CONSOLE_URL } from "@calcom/lib/constants";import { prisma, customPrisma } from "@calcom/prisma";+import { PRISMA_CLIENT_CACHING_TIME } from "../../lib/constants";+// This replaces the prisma client for the cusotm one if the key is validexport const customPrismaClient: NextMiddleware = async (req, res, next) => {const {@@ -18,9 +19,7 @@ export const customPrismaClient: NextMiddleware = async (req, res, next) => {return;}// If we have a key, we check if the deployment matching the key, has a databaseUrl value set.- const databaseUrl = await fetch(- `${process.env.NEXT_PUBLIC_CONSOLE_URL || CONSOLE_URL}/api/deployments/database?key=${key}`- )+ const databaseUrl = await fetch(`${CONSOLE_URL}/api/deployments/database?key=${key}`).then((res) => res.json()).then((res) => res.databaseUrl);diff --git a/pages/api/users/_get.ts b/pages/api/users/_get.tsindex 6c6e140e7a8..6e9b9c1c2bd 100644--- a/pages/api/users/_get.ts+++ b/pages/api/users/_get.ts@@ -1,3 +1,4 @@+import { Prisma } from "@prisma/client";import type { NextApiRequest } from "next";import { defaultResponder } from "@calcom/lib/server";@@ -5,8 +6,6 @@ import { defaultResponder } from "@calcom/lib/server";import { withMiddleware } from "~/lib/helpers/withMiddleware";import { schemaUsersReadPublic } from "~/lib/validations/user";-import { Prisma } from ".prisma/client";-/*** @swagger* /users: