aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-07-26 11:32:58 -0700
committerAdam Soltys <[email protected]>2022-07-26 11:32:58 -0700
commit6f2289f358e610a708cdd5d39265889b30b3a7d6 (patch)
tree26a395774f1878ba7d5057f768eac74dc8135396 /src/lib/utils.js
parente78798d8ea6b8d27206e7e3501310ec4df9714ca (diff)
downloadcoinos-ui-6f2289f358e610a708cdd5d39265889b30b3a7d6.tar.gz
coinos-ui-6f2289f358e610a708cdd5d39265889b30b3a7d6.zip
wire up the login backend
Diffstat (limited to 'src/lib/utils.js')
-rw-r--r--src/lib/utils.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js
index ba0d8335..595d2dd8 100644
--- a/src/lib/utils.js
+++ b/src/lib/utils.js
@@ -1,3 +1,10 @@
export function scroll(section) {
section.scrollIntoView({ behavior: 'smooth' });
}
+
+export const post = (url, body) =>
+ fetch(url, {
+ method: 'POST',
+ body: JSON.stringify(body),
+ headers: { 'accept': 'application/json', 'content-type': 'application/json' }
+ });