Skip to content

Commit 28dcc6c

Browse files
fix: license key env type api-v2 (#15519)
1 parent 945fe57 commit 28dcc6c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

apps/api/v2/src/config/app.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const loadConfig = (): AppConfig => {
1717
}/v2`,
1818
keyPrefix: getEnv("API_KEY_PREFIX", "cal_"),
1919
licenseKey: getEnv("CALCOM_LICENSE_KEY", ""),
20-
licenceKeyUrl: getEnv("GET_LICENSE_KEY_URL", "https://console.cal.com/api/license"),
20+
licenseKeyUrl: getEnv("GET_LICENSE_KEY_URL", "https://console.cal.com/api/license"),
2121
},
2222
db: {
2323
readUrl: getEnv("DATABASE_READ_URL"),

apps/api/v2/src/config/type.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export type AppConfig = {
88
url: string;
99
keyPrefix: string;
1010
licenseKey: string;
11-
licenceKeyUrl: string;
11+
licenseKeyUrl: string;
1212
};
1313
db: {
1414
readUrl: string;

apps/api/v2/src/modules/deployments/deployments.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class DeploymentsService {
3333
if (!licenseKey) {
3434
return false;
3535
}
36-
const licenseKeyUrl = this.configService.get("api.licenseKeyUrl");
36+
const licenseKeyUrl = this.configService.get("api.licenseKeyUrl") + `?key=${licenseKey}`;
3737
const cachedData = await this.redisService.redis.get(getLicenseCacheKey(licenseKey));
3838
if (cachedData) {
3939
return (JSON.parse(cachedData) as LicenseCheckResponse)?.valid;

0 commit comments

Comments
 (0)