aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/withdraw/+server.js
diff options
context:
space:
mode:
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' } });
}