diff options
| author | secondl1ght <[email protected]> | 2022-07-30 13:01:35 -0600 |
|---|---|---|
| committer | secondl1ght <[email protected]> | 2022-07-30 13:01:35 -0600 |
| commit | 7b2050102eb01fe3a694a60b0111262eacef735f (patch) | |
| tree | 0d0f4070fd763885ee605cdac9baf1d491bac3a6 /src/lib/utils.js | |
| parent | e599c7dec8b79903b769f957231c67e16dde9bfc (diff) | |
| parent | ef3bd2f6687d0bfca1b85cc3f4be47c8e628c748 (diff) | |
| download | coinos-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.js | 5 |
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', |
