diff options
author | Renard | 2019-09-11 19:54:48 -0300 |
---|---|---|
committer | Renard | 2019-09-11 19:54:48 -0300 |
commit | 5382ed028c7ec554f760affa7f533b15421959c9 (patch) | |
tree | 1d897091ee555f05c702b5c3c2130d2aae406ce8 /src/Api.js | |
parent | 12efc9102e1c2590492e9ead60d7de87944dc47f (diff) | |
download | bai-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.js | 13 |
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 |