aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils.js
diff options
context:
space:
mode:
authorsecondl1ght <[email protected]>2022-07-30 13:01:35 -0600
committersecondl1ght <[email protected]>2022-07-30 13:01:35 -0600
commit7b2050102eb01fe3a694a60b0111262eacef735f (patch)
tree0d0f4070fd763885ee605cdac9baf1d491bac3a6 /src/lib/utils.js
parente599c7dec8b79903b769f957231c67e16dde9bfc (diff)
parentef3bd2f6687d0bfca1b85cc3f4be47c8e628c748 (diff)
downloadcoinos-ui-7b2050102eb01fe3a694a60b0111262eacef735f.tar.gz
coinos-ui-7b2050102eb01fe3a694a60b0111262eacef735f.zip
Merge branch 'master' of github.com:coinos/coinos-ui-v2
Diffstat (limited to 'src/lib/utils.js')
-rw-r--r--src/lib/utils.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js
index c17b0a98..e9d1b73e 100644
--- a/src/lib/utils.js
+++ b/src/lib/utils.js
@@ -6,6 +6,11 @@ export function scroll(section) {
const base = browser ? '' : import.meta.env.VITE_COINOS_URL;
+export const get = (url) =>
+ fetch(base + url, {
+ headers: { accept: 'application/json'}
+ }).then((r) => r.json());
+
export const post = (url, body) =>
fetch(base + url, {
method: 'POST',