Skip to content

Commit

Permalink
Merge pull request #897 from weni-ai/feat/add-organization-limit-billing
Browse files Browse the repository at this point in the history
[ENGAGE-1570] - Update organizationLimit billing url
  • Loading branch information
mateuseduardomedeiros authored Sep 4, 2024
2 parents 9ea6290 + 7e0e1e2 commit c7a5f65
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/api/orgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down

0 comments on commit c7a5f65

Please sign in to comment.