Change to WEBAPP_URL (#7643)

pull/7591/head
Joe Au-Yeung 2023-03-10 09:18:03 -05:00 committed by GitHub
parent 7edebbcef0
commit 4e8653cf4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -24,7 +24,7 @@ import { samlTenantProduct } from "@calcom/features/ee/sso/lib/saml";
import { isPrismaObjOrUndefined, parseRecurringEvent } from "@calcom/lib";
import getEnabledApps from "@calcom/lib/apps/getEnabledApps";
import { ErrorCode, verifyPassword } from "@calcom/lib/auth";
import { IS_SELF_HOSTED } from "@calcom/lib/constants";
import { IS_SELF_HOSTED, WEBAPP_URL } from "@calcom/lib/constants";
import { symmetricDecrypt } from "@calcom/lib/crypto";
import getPaymentAppData from "@calcom/lib/getPaymentAppData";
import hasKeyInMetadata from "@calcom/lib/hasKeyInMetadata";
@ -1129,8 +1129,7 @@ const loggedInViewerRouter = router({
});
// Revalidate user calendar cache.
if (credential.app?.slug.includes("calendar")) {
const baseURL = process.env.VERCEL_URL || process.env.NEXT_PUBLIC_WEBAPP_URL;
await fetch(`${baseURL}/api/revalidate-calendar-cache/${ctx?.user?.username}`);
await fetch(`${WEBAPP_URL}/api/revalidate-calendar-cache/${ctx?.user?.username}`);
}
}),
bookingUnconfirmedCount: authedProcedure.query(async ({ ctx }) => {