diff options
| author | Adam Soltys <[email protected]> | 2023-01-13 20:26:53 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-01-13 20:26:53 -0800 |
| commit | 277b921ab2a97ac170f980c3c916ab1488318f2f (patch) | |
| tree | af771877eb261c41aa158aef2dddf96fa40f653c /src/routes/(app)/invoice | |
| parent | e0671101e4b217ff891fad85482e5943aa5cf543 (diff) | |
| download | coinos-ui-277b921ab2a97ac170f980c3c916ab1488318f2f.tar.gz coinos-ui-277b921ab2a97ac170f980c3c916ab1488318f2f.zip | |
server redis migration
Diffstat (limited to 'src/routes/(app)/invoice')
| -rw-r--r-- | src/routes/(app)/invoice/[id]/+layout.server.js | 2 | ||||
| -rw-r--r-- | src/routes/(app)/invoice/[id]/+page.svelte | 6 | ||||
| -rw-r--r-- | src/routes/(app)/invoice/[id]/paid/+page.svelte | 4 | ||||
| -rw-r--r-- | src/routes/(app)/invoice/[id]/tip/+page.server.js | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/routes/(app)/invoice/[id]/+layout.server.js b/src/routes/(app)/invoice/[id]/+layout.server.js index b4d7d496..adcea6df 100644 --- a/src/routes/(app)/invoice/[id]/+layout.server.js +++ b/src/routes/(app)/invoice/[id]/+layout.server.js @@ -6,7 +6,7 @@ export async function load({ depends, params, url }) { depends('app:invoice'); let { id } = params; - let invoice = await get(`/invoice?uuid=${id}`); + let invoice = await get(`/invoice?id=${id}`); let { amount, received, pending } = invoice; amount = parseInt(amount); diff --git a/src/routes/(app)/invoice/[id]/+page.svelte b/src/routes/(app)/invoice/[id]/+page.svelte index 5eadb179..db491c66 100644 --- a/src/routes/(app)/invoice/[id]/+page.svelte +++ b/src/routes/(app)/invoice/[id]/+page.svelte @@ -22,7 +22,7 @@ prompt, text, tip, - user: { username, currency, uuid } + user: { username, currency } } = invoice; let showQr = !amount; @@ -43,7 +43,7 @@ prompt, text, tip, - user: { username, currency, uuid } + user: { username, currency } } = invoice); tipPercent = (tip / amount) * 100; @@ -108,7 +108,7 @@ > {#if user && user.username !== username} - <a href={`/send/${invoice.uuid}`}> + <a href={`/send/${invoice.id}`}> <button class="flex rounded-full border py-2 px-5 font-bold hover:opacity-80"> <Icon icon="send" style="mr-1" /> <div class="my-auto">Pay</div> diff --git a/src/routes/(app)/invoice/[id]/paid/+page.svelte b/src/routes/(app)/invoice/[id]/paid/+page.svelte index ec0f6fae..2ce414e2 100644 --- a/src/routes/(app)/invoice/[id]/paid/+page.svelte +++ b/src/routes/(app)/invoice/[id]/paid/+page.svelte @@ -9,8 +9,8 @@ import { invoices } from '$lib/store'; export let data; - let amount, currency, rate, received, pending, tip, user, uuid; - $: data && ({ amount, currency, rate, received, pending, tip, user, uuid } = data.invoice); + let amount, currency, rate, received, pending, tip, user, id; + $: data && ({ amount, currency, rate, received, pending, tip, user, id } = data.invoice); toast.pop(0); diff --git a/src/routes/(app)/invoice/[id]/tip/+page.server.js b/src/routes/(app)/invoice/[id]/tip/+page.server.js index dd618b8a..c78e5020 100644 --- a/src/routes/(app)/invoice/[id]/tip/+page.server.js +++ b/src/routes/(app)/invoice/[id]/tip/+page.server.js @@ -3,7 +3,7 @@ import { redirect } from '@sveltejs/kit'; export async function load({ parent }) { let { invoice } = await parent(); - if (!invoice.amount) throw redirect(307, `/invoice/${invoice.uuid}`); + if (!invoice.amount) throw redirect(307, `/invoice/${invoice.id}`); } export const actions = { |
