From dcd4fe70f6f23a5ac2df3b773fea89c1acd878b6 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 5 Aug 2022 10:21:48 -0700 Subject: lightning withdrawals --- src/routes/withdraw.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/routes/withdraw.js (limited to 'src/routes/withdraw.js') diff --git a/src/routes/withdraw.js b/src/routes/withdraw.js new file mode 100644 index 00000000..aaed2250 --- /dev/null +++ b/src/routes/withdraw.js @@ -0,0 +1,10 @@ +import { post } from '$lib/utils'; +export async function POST({ locals, request }) { + let { token } = locals; + let body = await request.json(); + console.log(body) + body = await post('/lightning/send', body, { + authorization: `Bearer ${token}` + }); + return { body }; +} -- cgit v1.2.3