From b13d88d63dbd7ce7df9d6847036d3e36d78f97b2 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 26 Jul 2022 11:32:58 -0700 Subject: wire up the login backend --- src/lib/utils.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/lib/utils.js') 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' } + }); -- cgit v1.2.3