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/lib/utils.js | |
| parent | 42e8425d9066e014ef8236a58b68780f763c59cf (diff) | |
| download | coinos-ui-c011ed5a2f45379aafd79b0e6fd3a87b64287651.tar.gz coinos-ui-c011ed5a2f45379aafd79b0e6fd3a87b64287651.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}` }; +}; |
