diff options
| author | Adam Soltys <[email protected]> | 2022-08-25 08:59:47 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-08-25 08:59:49 -0700 |
| commit | c011ed5a2f45379aafd79b0e6fd3a87b64287651 (patch) | |
| tree | e875e84879e54109ec4c687f576fd2d74763c0fc /src/routes/withdraw/+server.js | |
| parent | 42e8425d9066e014ef8236a58b68780f763c59cf (diff) | |
| download | coinos-ui-c011ed5a2f45379aafd79b0e6fd3a87b64287651.tar.gz coinos-ui-c011ed5a2f45379aafd79b0e6fd3a87b64287651.zip | |
fix withdrawals
Diffstat (limited to 'src/routes/withdraw/+server.js')
| -rw-r--r-- | src/routes/withdraw/+server.js | 11 |
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' } }); } |
