aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/withdraw/+server.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-08-25 08:59:47 -0700
committerAdam Soltys <[email protected]>2022-08-25 08:59:49 -0700
commitaca9e5105d006f49cebb6e89c3634f555e2e6740 (patch)
treebf64ab3b1c4da15945de0cf2a9e8a2402f18af4a /src/routes/withdraw/+server.js
parent8c8587e33567b41578355489989b9701a41efb55 (diff)
downloadcoinos-ui-aca9e5105d006f49cebb6e89c3634f555e2e6740.tar.gz
coinos-ui-aca9e5105d006f49cebb6e89c3634f555e2e6740.zip
fix withdrawals
Diffstat (limited to 'src/routes/withdraw/+server.js')
-rw-r--r--src/routes/withdraw/+server.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/routes/withdraw/+server.js b/src/routes/withdraw/+server.js
index 3f34b023..ed6e74ed 100644
--- a/src/routes/withdraw/+server.js
+++ b/src/routes/withdraw/+server.js
@@ -1,9 +1,8 @@
-import { post } from '$lib/utils';
+import { auth, post } from '$lib/utils';
-export async function POST({ locals, request }) {
- let { token } = locals;
+export async function POST({ request }) {
let body = await request.json();
- await post('/lightning/send', body, {
- authorization: `Bearer ${token}`
- });
+ await post('/lightning/send', body, auth(request));
+
+ return new Response(JSON.stringify("ok"), { headers: { 'content-type': 'application/json' } });
}