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 | 55719a6d91fad32dc1a633bbbfb5ad9a726ced50 (patch) | |
| tree | c235a822c8b570e6460e5d3b6773b5f025e24531 /src/lib/utils.js | |
| parent | 926b1cd61d5bca6e6e9fd3420681d0829341a1e0 (diff) | |
| parent | 7168cd2ea39aaa2158412bb5e966e144e8a22733 (diff) | |
| download | coinos-ui-55719a6d91fad32dc1a633bbbfb5ad9a726ced50.tar.gz coinos-ui-55719a6d91fad32dc1a633bbbfb5ad9a726ced50.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', |
