From 5382ed028c7ec554f760affa7f533b15421959c9 Mon Sep 17 00:00:00 2001 From: Renard Date: Wed, 11 Sep 2019 19:54:48 -0300 Subject: First commit --- src/Api.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/Api.js (limited to 'src/Api.js') diff --git a/src/Api.js b/src/Api.js new file mode 100644 index 0000000..b564aa2 --- /dev/null +++ b/src/Api.js @@ -0,0 +1,13 @@ +async function getBoards() { + var ret = await fetch("https://bienvenidoainternet.org/cgi/api/boards") + .then((response) => { + return response.json(); + }).then((resource) => { + //console.log(resource["boards"]); + return resource["boards"]; + }).catch(console.error) + + return ret; +} + +export default getBoards; \ No newline at end of file -- cgit v1.2.1-18-gbd029