diff options
| author | Adam Soltys <[email protected]> | 2022-09-05 11:23:59 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-05 11:23:59 -0700 |
| commit | e0616f3ddd0cc006fa2a2f4493e623a4b86f276f (patch) | |
| tree | 6d354d8fa20c69323e1f5ebe06caee285ad36042 /src/lib | |
| parent | 87effa45f50ec6b6ab524ee8c742fd255afd289c (diff) | |
| download | coinos-ui-e0616f3ddd0cc006fa2a2f4493e623a4b86f276f.tar.gz coinos-ui-e0616f3ddd0cc006fa2a2f4493e623a4b86f276f.zip | |
add origin env var
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/utils.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js index 401613b8..ecf93062 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -8,7 +8,7 @@ export function scroll(section) { const base = browser ? '' : import.meta.env.VITE_COINOS_URL; -export const get = (url, headers = { accept: 'application/json' }) => +export const get = (url, headers = {}) => fetch(base + url, { headers }) .then((r) => r.text()) .then((body) => { @@ -20,7 +20,7 @@ export const get = (url, headers = { accept: 'application/json' }) => }); export const post = (url, body, headers) => { - headers = { ...headers, accept: 'application/json', 'content-type': 'application/json' }; + headers = { ...headers, 'content-type': 'application/json' }; return fetch(base + url, { method: 'POST', body: JSON.stringify(body), |
