aboutsummaryrefslogtreecommitdiff
path: root/src/Api.js
diff options
context:
space:
mode:
authorLibravatar Renard 2019-09-11 19:54:48 -0300
committerLibravatar Renard 2019-09-11 19:54:48 -0300
commit5382ed028c7ec554f760affa7f533b15421959c9 (patch)
tree1d897091ee555f05c702b5c3c2130d2aae406ce8 /src/Api.js
parent12efc9102e1c2590492e9ead60d7de87944dc47f (diff)
downloadbai-client-5382ed028c7ec554f760affa7f533b15421959c9.tar.gz
bai-client-5382ed028c7ec554f760affa7f533b15421959c9.tar.xz
bai-client-5382ed028c7ec554f760affa7f533b15421959c9.zip
First commit
Diffstat (limited to 'src/Api.js')
-rw-r--r--src/Api.js13
1 files changed, 13 insertions, 0 deletions
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