mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Fix license api endpoint for self-hosted get billing table
This commit is contained in:
@@ -461,17 +461,16 @@ export const licenseServiceFactory = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const fetchPlanTableFromServer = async (customerId: string | null | undefined) => {
|
const fetchPlanTableFromServer = async (customerId: string | null | undefined) => {
|
||||||
if (!customerId) {
|
const baseUrl = `/api/license-server/v1/customers`;
|
||||||
throw new NotFoundError({ message: "Organization customer ID is required for plan table retrieval" });
|
|
||||||
}
|
|
||||||
|
|
||||||
const baseUrl = `/api/license-server/v1/customers/${customerId}`;
|
|
||||||
|
|
||||||
if (instanceType === InstanceType.Cloud) {
|
if (instanceType === InstanceType.Cloud) {
|
||||||
|
if (!customerId) {
|
||||||
|
throw new NotFoundError({ message: "Organization customer ID is required for plan table retrieval" });
|
||||||
|
}
|
||||||
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 }[];
|
||||||
}>(`${baseUrl}/cloud-plan/table`);
|
}>(`${baseUrl}/${customerId}/cloud-plan/table`);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user