aboutsummaryrefslogtreecommitdiff
path: root/src/Api.js
diff options
context:
space:
mode:
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