Skip to content

Commit

Permalink
rename ##placeholder## to :placeholder for consistency sake
Browse files Browse the repository at this point in the history
  • Loading branch information
magicznyleszek committed Nov 21, 2024
1 parent 3991fdc commit a6e7ce7
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions jsapp/js/account/usage/usage.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,15 @@ export interface UsageResponse {
}

const USAGE_URL = '/api/v2/service_usage/';
const ORGANIZATION_USAGE_URL =
'/api/v2/organizations/##ORGANIZATION_ID##/service_usage/';
const ORGANIZATION_USAGE_URL = '/api/v2/organizations/:organization_id/service_usage/';

const ASSET_USAGE_URL = '/api/v2/asset_usage/';
const ORGANIZATION_ASSET_USAGE_URL =
'/api/v2/organizations/##ORGANIZATION_ID##/asset_usage/';
const ORGANIZATION_ASSET_USAGE_URL = '/api/v2/organizations/:organization_id/asset_usage/';

export async function getUsage(organization_id: string | null = null) {
if (organization_id) {
return fetchGet<UsageResponse>(
ORGANIZATION_USAGE_URL.replace('##ORGANIZATION_ID##', organization_id),
ORGANIZATION_USAGE_URL.replace(':organization_id', organization_id),
{
includeHeaders: true,
errorMessageDisplay: t('There was an error fetching usage data.'),
Expand Down Expand Up @@ -95,10 +93,7 @@ export async function getAssetUsageForOrganization(
return await getAssetUsage(ASSET_USAGE_URL);
}

const apiUrl = ORGANIZATION_ASSET_USAGE_URL.replace(
'##ORGANIZATION_ID##',
organizationId
);
const apiUrl = ORGANIZATION_ASSET_USAGE_URL.replace(':organization_id', organizationId);

const params = new URLSearchParams({
page: pageNumber.toString(),
Expand Down

0 comments on commit a6e7ce7

Please sign in to comment.