aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/invoice/+server.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-09-25 21:34:57 -0700
committerAdam Soltys <[email protected]>2022-09-25 21:34:59 -0700
commita3ddc2c6919fb2c0a77ad6aae48cf80f37a774ee (patch)
tree803b542980507a47264fcdabf4ef4298b27fd70e /src/routes/invoice/+server.js
parent7bfd57b8b249fcf8ab87b52c8a4416d62f3cd1f6 (diff)
downloadcoinos-ui-a3ddc2c6919fb2c0a77ad6aae48cf80f37a774ee.tar.gz
coinos-ui-a3ddc2c6919fb2c0a77ad6aae48cf80f37a774ee.zip
wip
Diffstat (limited to 'src/routes/invoice/+server.js')
-rw-r--r--src/routes/invoice/+server.js4
1 files changed, 3 insertions, 1 deletions
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' } }