mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: invoices on selfhosted
This commit is contained in:
1 parent
fbd777d273
commit
c5b948e6dc
2 files changed
+6
-2
No files matched your search
@@ -99,4 +99,6 @@
|
||||
{/if}
|
||||
</Container>
|
||||
|
||||
<Delete bind:showDelete invoices={data.invoices} />
|
||||
{#if isCloud && data.invoices}
|
||||
<Delete bind:showDelete invoices={data.invoices} />
|
||||
{/if}
|
||||
@@ -2,12 +2,14 @@ import type { PageLoad } from './$types';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { Query } from '@appwrite.io/console';
|
||||
import { isCloud } from '$lib/system';
|
||||
|
||||
export const load: PageLoad = async ({ depends, parent }) => {
|
||||
const { organization } = await parent();
|
||||
depends(Dependencies.ORGANIZATION);
|
||||
|
||||
return {
|
||||
projects: await sdk.forConsole.projects.list([Query.equal('teamId', organization.$id)]),
|
||||
invoices: await sdk.forConsole.billing.listInvoices(organization.$id)
|
||||
invoices: isCloud ? await sdk.forConsole.billing.listInvoices(organization.$id) : undefined
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user