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 | aca9e5105d006f49cebb6e89c3634f555e2e6740 (patch) | |
| tree | bf64ab3b1c4da15945de0cf2a9e8a2402f18af4a /src/lib/utils.js | |
| parent | 8c8587e33567b41578355489989b9701a41efb55 (diff) | |
| download | coinos-ui-aca9e5105d006f49cebb6e89c3634f555e2e6740.tar.gz coinos-ui-aca9e5105d006f49cebb6e89c3634f555e2e6740.zip | |
fix withdrawals
Diffstat (limited to 'src/lib/utils.js')
| -rw-r--r-- | src/lib/utils.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js index 65025c3a..712ce8f5 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -126,3 +126,8 @@ export const login = async (user, setHeaders) => { }) }); }; + +export const auth = (req) => { + let { token } = cookie.parse(req.headers.get('cookie') || ''); + return { authorization: `Bearer ${token}` }; +}; |
