fix: license key env type api-v2 (#15519)

This commit is contained in:
Morgan
2024-06-21 09:04:43 +00:00
committed by GitHub
parent c958b6017a
commit 0288ea931f
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ const loadConfig = (): AppConfig => {
}/v2`,
keyPrefix: getEnv("API_KEY_PREFIX", "cal_"),
licenseKey: getEnv("CALCOM_LICENSE_KEY", ""),
licenceKeyUrl: getEnv("GET_LICENSE_KEY_URL", "https://console.cal.com/api/license"),
licenseKeyUrl: getEnv("GET_LICENSE_KEY_URL", "https://console.cal.com/api/license"),
},
db: {
readUrl: getEnv("DATABASE_READ_URL"),
+1 -1
View File
@@ -8,7 +8,7 @@ export type AppConfig = {
url: string;
keyPrefix: string;
licenseKey: string;
licenceKeyUrl: string;
licenseKeyUrl: string;
};
db: {
readUrl: string;
@@ -33,7 +33,7 @@ export class DeploymentsService {
if (!licenseKey) {
return false;
}
const licenseKeyUrl = this.configService.get("api.licenseKeyUrl");
const licenseKeyUrl = this.configService.get("api.licenseKeyUrl") + `?key=${licenseKey}`;
const cachedData = await this.redisService.redis.get(getLicenseCacheKey(licenseKey));
if (cachedData) {
return (JSON.parse(cachedData) as LicenseCheckResponse)?.valid;