From a3ddc2c6919fb2c0a77ad6aae48cf80f37a774ee Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 25 Sep 2022 21:34:57 -0700 Subject: wip --- src/routes/invoice/+server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/routes/invoice/+server.js') diff --git a/src/routes/invoice/+server.js b/src/routes/invoice/+server.js index d4c4c303..1a196bcf 100644 --- a/src/routes/invoice/+server.js +++ b/src/routes/invoice/+server.js @@ -5,11 +5,13 @@ export async function POST({ request, parent }) { let invoice = { amount, currency, network, rate, tip }; if (network === 'lightning') { - invoice.text = await post('/lightning/invoice', { amount }, auth(request)); + invoice.text = (await post('/lightning/invoice', { amount }, auth(request))).text; } else { invoice.address = (await parent()).user.address; } + console.log("INVOICE", invoice) + return new Response( JSON.stringify(await post('/invoice', { invoice, user: { username } }, auth(request))), { headers: { 'content-type': 'application/json' } } -- cgit v1.2.3