From dc9ba4b1461d52abe09de257b840ddd15ba357ff Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Tue, 27 May 2025 16:30:21 -0700 Subject: [PATCH] fix: fix invoice view and download links The prefix should be the api endpoint instead of the base path so that the developer goes straight to the API endpoint to view or download their invoice. --- .../billing/paymentHistory.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/(console)/organization-[organization]/billing/paymentHistory.svelte b/src/routes/(console)/organization-[organization]/billing/paymentHistory.svelte index 969a8a8765..c44c40c9da 100644 --- a/src/routes/(console)/organization-[organization]/billing/paymentHistory.svelte +++ b/src/routes/(console)/organization-[organization]/billing/paymentHistory.svelte @@ -5,7 +5,7 @@ import { toLocaleDate } from '$lib/helpers/date'; import { formatCurrency } from '$lib/helpers/numbers'; import type { Invoice, InvoiceList } from '$lib/sdk/billing'; - import { sdk } from '$lib/stores/sdk'; + import { getApiEndpoint, sdk } from '$lib/stores/sdk'; import { Query } from '@appwrite.io/console'; import { onMount } from 'svelte'; import { trackEvent } from '$lib/actions/analytics'; @@ -27,7 +27,6 @@ IconExternalLink, IconRefresh } from '@appwrite.io/pink-icons-svelte'; - import { base } from '$app/paths'; let offset = 0; let invoiceList: InvoiceList = { @@ -36,6 +35,7 @@ }; const limit = 5; + const endpoint = getApiEndpoint(); onMount(request); @@ -134,12 +134,12 @@ + href={`${endpoint}/organizations/${page.params.organization}/invoices/${invoice.$id}/view`}> View invoice + href={`${endpoint}/organizations/${page.params.organization}/invoices/${invoice.$id}/download`}> Download PDF {#if status === 'overdue' || status === 'failed'}