aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-09-05 11:23:59 -0700
committerAdam Soltys <[email protected]>2022-09-05 11:23:59 -0700
commite0616f3ddd0cc006fa2a2f4493e623a4b86f276f (patch)
tree6d354d8fa20c69323e1f5ebe06caee285ad36042 /src/lib/utils.js
parent87effa45f50ec6b6ab524ee8c742fd255afd289c (diff)
downloadcoinos-ui-e0616f3ddd0cc006fa2a2f4493e623a4b86f276f.tar.gz
coinos-ui-e0616f3ddd0cc006fa2a2f4493e623a4b86f276f.zip
add origin env var
Diffstat (limited to 'src/lib/utils.js')
-rw-r--r--src/lib/utils.js4
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),