diff options
| author | Adam Soltys <[email protected]> | 2024-09-20 10:03:30 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-09-20 10:03:30 -0700 |
| commit | fb8510db273f78317a02ca151f7f24a9b8de29ab (patch) | |
| tree | 6ef7f6c272118156076de7a9025d89a8e1a70ce9 /src/routes/(app)/invoice | |
| parent | 5c86d9eadaa0021928ea39c7d0e875d0c446280f (diff) | |
| download | coinos-ui-fb8510db273f78317a02ca151f7f24a9b8de29ab.tar.gz coinos-ui-fb8510db273f78317a02ca151f7f24a9b8de29ab.zip | |
rename account_id
Diffstat (limited to 'src/routes/(app)/invoice')
| -rw-r--r-- | src/routes/(app)/invoice/+page.server.ts | 6 | ||||
| -rw-r--r-- | src/routes/(app)/invoice/[id]/+page.svelte | 6 | ||||
| -rw-r--r-- | src/routes/(app)/invoice/[id]/tip/+page.svelte | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/routes/(app)/invoice/+page.server.ts b/src/routes/(app)/invoice/+page.server.ts index 98bbe8c3..7bac3f9b 100644 --- a/src/routes/(app)/invoice/+page.server.ts +++ b/src/routes/(app)/invoice/+page.server.ts @@ -3,18 +3,18 @@ import { error, redirect } from "@sveltejs/kit"; import type { Invoice } from "$lib/types"; export let load = async ({ cookies, parent }) => { - let account_id = cookies.get("account_id"); + let aid = cookies.get("aid"); let { subject, user, rates } = await parent(); let invoice: Invoice = { - account_id, + aid, rate: rates[user?.currency || subject?.currency], }; if (!user) user = subject; try { - invoice = await post("/invoice", { invoice, account_id, user }, auth(cookies)); + invoice = await post("/invoice", { invoice, aid, user }, auth(cookies)); } catch (e) { console.log(e); error(500, "Failed to generate invoice"); diff --git a/src/routes/(app)/invoice/[id]/+page.svelte b/src/routes/(app)/invoice/[id]/+page.svelte index 321129a8..580456cd 100644 --- a/src/routes/(app)/invoice/[id]/+page.svelte +++ b/src/routes/(app)/invoice/[id]/+page.svelte @@ -40,7 +40,7 @@ $: refresh(data); let { invoice, id, subject, user, src } = data; let { - account_id, + aid, amount, hash, type, @@ -56,7 +56,7 @@ let refresh = async (data) => { ({ invoice, id, user, src } = data); ({ - account_id, + aid, amount, hash, type, @@ -236,7 +236,7 @@ </div> </div> - {#if account_id === user.id} + {#if aid === user.id} <div class="grid grid-cols-2 justify-around text-secondary"> <button class="hover:bg-primary my-auto flex gap-1 sm:gap-2 py-3 px-2 sm:px-5 justify-center" diff --git a/src/routes/(app)/invoice/[id]/tip/+page.svelte b/src/routes/(app)/invoice/[id]/tip/+page.svelte index e4510693..da2d041e 100644 --- a/src/routes/(app)/invoice/[id]/tip/+page.svelte +++ b/src/routes/(app)/invoice/[id]/tip/+page.svelte @@ -59,7 +59,7 @@ $: refresh(data); let { invoice, id, user, rates } = data; let { - account_id, + aid, amount, hash, items, @@ -82,7 +82,7 @@ ({ invoice, id } = data); ({ - account_id, + aid, amount, hash, items, @@ -113,7 +113,7 @@ <div class="container px-4 max-w-lg text-center mx-auto"> <form method="POST" use:enhance class:invisible={submitting}> - <input type="hidden" name="account_id" value={account_id} /> + <input type="hidden" name="aid" value={aid} /> <input type="hidden" name="amount" value={amount} /> <input type="hidden" name="tip" value={tip} /> <input type="hidden" name="username" value={username} /> |
