From 7e0e1e2118c5b419308875ca77cd07ff59d6529d Mon Sep 17 00:00:00 2001 From: Eduardo Medeiros Date: Wed, 4 Sep 2024 17:29:10 -0300 Subject: [PATCH] feat: update organizationLimit billing url --- src/api/orgs.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/api/orgs.js b/src/api/orgs.js index 152599c4..8dc4d669 100644 --- a/src/api/orgs.js +++ b/src/api/orgs.js @@ -78,11 +78,18 @@ export default { }, organizationLimit({ organizationUuid }) { - return request - .$http() - .get( - `/v1/organization/org/billing/organization-on-limit/${organizationUuid}/`, - ); + // Use the billing url, if it does not exist, consider the previous format via root api. + const { http, url } = getEnv('VITE_BILLING_API_URL') + ? { + http: billingHttp, + url: `/api/v1/orgs/${organizationUuid}/organization-on-limit/`, + } + : { + http: request.$http(), + url: `/v1/organization/org/billing/organization-on-limit/${organizationUuid}/`, + }; + + return http.get(url); }, getActiveContacts({ organizationUuid, after, before }) {