From 9c67a7452c2dd3ea0049c84944e617a92f184ab0 Mon Sep 17 00:00:00 2001 From: zomars Date: Tue, 1 Mar 2022 10:01:57 -0700 Subject: [PATCH] WIP --- packages/app-store/zoomvideo/api/add.ts | 1 + packages/lib/constants.ts | 3 ++- packages/types/next.d.ts | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/app-store/zoomvideo/api/add.ts b/packages/app-store/zoomvideo/api/add.ts index e04fd73e09..640e6753a9 100644 --- a/packages/app-store/zoomvideo/api/add.ts +++ b/packages/app-store/zoomvideo/api/add.ts @@ -3,6 +3,7 @@ import { stringify } from "querystring"; import { BASE_URL } from "@calcom/lib/constants"; import prisma from "@calcom/prisma"; +import "@calcom/types/next"; const client_id = process.env.ZOOM_CLIENT_ID; diff --git a/packages/lib/constants.ts b/packages/lib/constants.ts index b2f1800efd..861adfb99b 100644 --- a/packages/lib/constants.ts +++ b/packages/lib/constants.ts @@ -1,4 +1,5 @@ -export const BASE_URL = process.env.BASE_URL || `https://${process.env.VERCEL_URL}`; +export const BASE_URL = + process.env.NEXT_PUBLIC_BASE_URL || process.env.BASE_URL || `https://${process.env.VERCEL_URL}`; export const WEBSITE_URL = process.env.NEXT_PUBLIC_APP_URL || "https://cal.com"; export const IS_PRODUCTION = process.env.NODE_ENV === "production"; export const TRIAL_LIMIT_DAYS = 14; diff --git a/packages/types/next.d.ts b/packages/types/next.d.ts index fc1126adb6..aa0e02c1c2 100644 --- a/packages/types/next.d.ts +++ b/packages/types/next.d.ts @@ -3,8 +3,8 @@ import type { Session } from "next-auth"; import "./next-auth"; -declare module "next" { - export interface NextApiRequest extends IncomingMessage { +export declare module "next" { + interface NextApiRequest extends IncomingMessage { session?: Session | null; } }