From 5f707e77c19159f2eb68597798cbbb30b24d7ef1 Mon Sep 17 00:00:00 2001 From: Carlos Monastyrski Date: Fri, 26 Sep 2025 23:43:24 -0300 Subject: [PATCH] Fix license api endpoint for self-hosted get billing table --- backend/src/ee/services/license/license-service.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/backend/src/ee/services/license/license-service.ts b/backend/src/ee/services/license/license-service.ts index 0fdd07396..544eeae37 100644 --- a/backend/src/ee/services/license/license-service.ts +++ b/backend/src/ee/services/license/license-service.ts @@ -461,17 +461,16 @@ export const licenseServiceFactory = ({ }; const fetchPlanTableFromServer = async (customerId: string | null | undefined) => { - if (!customerId) { - throw new NotFoundError({ message: "Organization customer ID is required for plan table retrieval" }); - } - - const baseUrl = `/api/license-server/v1/customers/${customerId}`; + const baseUrl = `/api/license-server/v1/customers`; 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<{ head: { name: string }[]; rows: { name: string; allowed: boolean }[]; - }>(`${baseUrl}/cloud-plan/table`); + }>(`${baseUrl}/${customerId}/cloud-plan/table`); return data; }