feat: usage base billed - license key check - move to private api (#15222)

Co-authored-by: Omar López <[email protected]>
This commit is contained in:
sean-brydonandOmar López authored and GitHub committed 2024-07-25 13:20:24 -07:00
1 parent 53c37a9ddf
commit e16662e655
16 files changed
+586 -59

No files matched your search

@@ -3,7 +3,7 @@ import type { GetServerSidePropsContext, NextApiRequest, NextApiResponse } from
import type { AuthOptions, Session } from "next-auth";
import { getToken } from "next-auth/jwt";
import checkLicense from "@calcom/features/ee/common/server/checkLicense";
import LicenseKeyService from "@calcom/ee/common/server/LicenseKeyService";
import { getUserAvatarUrl } from "@calcom/lib/getAvatarUrl";
import logger from "@calcom/lib/logger";
import { safeStringify } from "@calcom/lib/safeStringify";
@@ -65,7 +65,8 @@ export async function getServerSession(options: {
return null;
}
const hasValidLicense = await checkLicense(prisma);
const licenseKeyService = await LicenseKeyService.create();
const hasValidLicense = await licenseKeyService.checkLicense();
let upId = token.upId;