diff options
| author | Adam Soltys <[email protected]> | 2024-12-26 13:55:33 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-12-26 13:55:33 -0800 |
| commit | dacbd16c4373a9a16ef2db38a7765a0e207134da (patch) | |
| tree | 2eafb84fea10bea51c636a98302621ce16e667ea /src/routes | |
| parent | 3c0489e1cca4f6a211215b700489d256695c3ce1 (diff) | |
| download | coinos-ui-dacbd16c4373a9a16ef2db38a7765a0e207134da.tar.gz coinos-ui-dacbd16c4373a9a16ef2db38a7765a0e207134da.zip | |
bolt 12 type
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/(app)/invoices/+page.server.ts | 7 | ||||
| -rw-r--r-- | src/routes/(app)/invoices/+page.svelte | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/routes/(app)/invoices/+page.server.ts b/src/routes/(app)/invoices/+page.server.ts new file mode 100644 index 00000000..081d6a5b --- /dev/null +++ b/src/routes/(app)/invoices/+page.server.ts @@ -0,0 +1,7 @@ +import { auth, get } from "$lib/utils"; + +export async function load({ cookies }) { + const invoices = await get("/invoices", auth(cookies)); + console.log(invoices.length) + return { invoices }; +} diff --git a/src/routes/(app)/invoices/+page.svelte b/src/routes/(app)/invoices/+page.svelte new file mode 100644 index 00000000..ffbc550e --- /dev/null +++ b/src/routes/(app)/invoices/+page.svelte @@ -0,0 +1,9 @@ +<script> + let { data } = $props(); + let { invoices } = $derived(data); +</script> + +{invoices.length} +{#each invoices as i} + {JSON.stringify(i)} +{/each} |
