diff options
Diffstat (limited to 'src/routes/invoice/+server.js')
| -rw-r--r-- | src/routes/invoice/+server.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/routes/invoice/+server.js b/src/routes/invoice/+server.js index 9b96b114..5b2f2b39 100644 --- a/src/routes/invoice/+server.js +++ b/src/routes/invoice/+server.js @@ -1,10 +1,10 @@ import { auth, get, post } from '$lib/utils'; -export async function POST({ request, parent }) { +export async function POST({ cookies, request }) { let { amount, currency, network = 'lightning', prompt, rate, tip, user } = await request.json(); let invoice = { amount, currency, network, prompt, rate, tip }; - return new Response(JSON.stringify(await post('/invoice', { invoice, user }, auth(request))), { + return new Response(JSON.stringify(await post('/invoice', { invoice, user }, auth(cookies))), { headers: { 'content-type': 'application/json' } }); } |
