diff options
Diffstat (limited to 'src/routes/invoice/+server.js')
| -rw-r--r-- | src/routes/invoice/+server.js | 4 |
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' } } |
