From 7168cd2ea39aaa2158412bb5e966e144e8a22733 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 30 Jul 2022 11:50:42 -0700 Subject: invoice updates --- src/routes/[username]/receive.svelte | 2 +- src/routes/invoice/[id].js | 6 +- src/routes/invoice/[id].svelte | 290 +++++++++++++++++------------------ src/routes/invoice/index.js | 4 +- 4 files changed, 144 insertions(+), 158 deletions(-) (limited to 'src') diff --git a/src/routes/[username]/receive.svelte b/src/routes/[username]/receive.svelte index 9ebc0401..e0bf7751 100644 --- a/src/routes/[username]/receive.svelte +++ b/src/routes/[username]/receive.svelte @@ -82,7 +82,7 @@ }; let submit = async () => { - let { id } = await post('/invoice', { amount, username: $page.params.username }); + let { id } = await post('/invoice', { amount, rate: $rate, username: $page.params.username }); console.log(id) goto(`/invoice/${id}`); }; diff --git a/src/routes/invoice/[id].js b/src/routes/invoice/[id].js index 37ef098d..7d18ba86 100644 --- a/src/routes/invoice/[id].js +++ b/src/routes/invoice/[id].js @@ -5,7 +5,9 @@ const username = 'bob', export async function GET({ params }) { let { id } = params; - let { amount, text } = await get(`/invoice?uuid=${id}`); + let huh = await get(`/invoice?uuid=${id}`); + console.log(huh) + let { amount, rate, text } = await get(`/invoice?uuid=${id}`); - return { body: { amount, text } }; + return { body: { amount, rate, text } }; } diff --git a/src/routes/invoice/[id].svelte b/src/routes/invoice/[id].svelte index d1dea907..a9f3cefb 100644 --- a/src/routes/invoice/[id].svelte +++ b/src/routes/invoice/[id].svelte @@ -1,25 +1,25 @@