mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-02 20:25:47 +00:00
feat: fixed license server changes in cloud
This commit is contained in:
@@ -2,9 +2,9 @@ import axios, { AxiosError } from "axios";
|
|||||||
|
|
||||||
import { getConfig } from "@app/lib/config/env";
|
import { getConfig } from "@app/lib/config/env";
|
||||||
import { request } from "@app/lib/config/request";
|
import { request } from "@app/lib/config/request";
|
||||||
|
import { logger } from "@app/lib/logger";
|
||||||
|
|
||||||
import { TFeatureSet } from "./license-types";
|
import { TFeatureSet } from "./license-types";
|
||||||
import { logger } from "@app/lib/logger";
|
|
||||||
|
|
||||||
export const getDefaultOnPremFeatures = (): TFeatureSet => ({
|
export const getDefaultOnPremFeatures = (): TFeatureSet => ({
|
||||||
_id: null,
|
_id: null,
|
||||||
|
|||||||
@@ -379,7 +379,7 @@ export const licenseServiceFactory = ({
|
|||||||
message: `Organization with ID '${orgId}' not found`
|
message: `Organization with ID '${orgId}' not found`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (instanceType !== InstanceType.OnPrem && instanceType !== InstanceType.EnterpriseOnPremOffline) {
|
if (instanceType === InstanceType.Cloud) {
|
||||||
const { data } = await licenseServerCloudApi.request.get(
|
const { data } = await licenseServerCloudApi.request.get(
|
||||||
`/api/license-server/v1/customers/${organization.customerId}/cloud-plan/billing`
|
`/api/license-server/v1/customers/${organization.customerId}/cloud-plan/billing`
|
||||||
);
|
);
|
||||||
@@ -413,7 +413,7 @@ export const licenseServiceFactory = ({
|
|||||||
const projects = await projectDAL.find({ orgId });
|
const projects = await projectDAL.find({ orgId });
|
||||||
const projectCount = projects.length;
|
const projectCount = projects.length;
|
||||||
|
|
||||||
if (instanceType !== InstanceType.OnPrem && instanceType !== InstanceType.EnterpriseOnPremOffline) {
|
if (instanceType === InstanceType.Cloud) {
|
||||||
const { data } = await licenseServerCloudApi.request.get<{
|
const { data } = await licenseServerCloudApi.request.get<{
|
||||||
head: { name: string }[];
|
head: { name: string }[];
|
||||||
rows: { name: string; allowed: boolean }[];
|
rows: { name: string; allowed: boolean }[];
|
||||||
|
|||||||
Reference in New Issue
Block a user