aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-02-22 13:39:01 -0800
committerAdam Soltys <[email protected]>2024-02-22 13:39:01 -0800
commit65e047cf6f7e5537e9e18a366f692affa634e7b9 (patch)
treea07bbfcef61a6d17ec9e1e244b5d6359445008c1 /src/routes
parent8d33c5fe90f731f0c4326ca787cb1150ac46fcd9 (diff)
downloadcoinos-ui-65e047cf6f7e5537e9e18a366f692affa634e7b9.tar.gz
coinos-ui-65e047cf6f7e5537e9e18a366f692affa634e7b9.zip
stringify items
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/(app)/[username]/invoice/[id]/tip/+page.svelte2
-rw-r--r--src/routes/(app)/send/invoice/[id]/+page.server.js4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/routes/(app)/[username]/invoice/[id]/tip/+page.svelte b/src/routes/(app)/[username]/invoice/[id]/tip/+page.svelte
index 10fbb239..e9472118 100644
--- a/src/routes/(app)/[username]/invoice/[id]/tip/+page.svelte
+++ b/src/routes/(app)/[username]/invoice/[id]/tip/+page.svelte
@@ -118,7 +118,7 @@
<input type="hidden" name="prompt" value="false" />
<input type="hidden" name="type" value={type} />
<input type="hidden" name="hash" value={hash} />
- <input type="hidden" name="items" value={items} />
+ <input type="hidden" name="items" value={JSON.stringify(items)} />
<input type="hidden" name="request_id" value={invoice.request?.id} />
diff --git a/src/routes/(app)/send/invoice/[id]/+page.server.js b/src/routes/(app)/send/invoice/[id]/+page.server.js
index b0cbef45..dcf188b2 100644
--- a/src/routes/(app)/send/invoice/[id]/+page.server.js
+++ b/src/routes/(app)/send/invoice/[id]/+page.server.js
@@ -6,8 +6,6 @@ export async function load({ params: { id }, parent, url }) {
let invoice = await get(`/invoice/${id}`);
- console.log("OH", invoice, invoice.prompt, invoice.tip);
-
if (invoice.prompt && invoice.tip === null)
redirect(307, `/${invoice.user.username}/invoice/${id}/tip`);
if (invoice.user.username === user.username)
@@ -24,7 +22,7 @@ export const actions = {
await post("/payments", body, auth(cookies));
} catch (e) {
- console.log("payment failed", params, e);
+ console.log("payment failed", id, e);
return fail(400, { message: e.message });
}