projects
/
brackets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a649068
)
Fetch from official api
author
Jacob Casper
<dev@jacobcasper.com>
Sun, 19 Apr 2020 04:51:16 +0000
(23:51 -0500)
committer
Jacob Casper
<dev@jacobcasper.com>
Sun, 19 Apr 2020 04:51:16 +0000
(23:51 -0500)
frontend/index.js
patch
|
blob
|
blame
|
history
diff --git
a/frontend/index.js
b/frontend/index.js
index
e99deba
..
07d0d2d
100644
(file)
--- a/
frontend/index.js
+++ b/
frontend/index.js
@@
-156,7
+156,7
@@
window.onload = () => {
const canvas = document.getElementById("bracket");
const formSubmitAction = () => {
const canvas = document.getElementById("bracket");
const formSubmitAction = () => {
- fetch(encodeURI(`http://
localhost:8080
/artist/genre?genre_name=${genreInput.value}`))
+ fetch(encodeURI(`http://
api.brackets.jacobcasper.com
/artist/genre?genre_name=${genreInput.value}`))
.then((response) => response.json())
.then((data) => drawBracket(canvas, data.slice(0, 33), genreInput.value));
}
.then((response) => response.json())
.then((data) => drawBracket(canvas, data.slice(0, 33), genreInput.value));
}
@@
-169,7
+169,7
@@
window.onload = () => {
}
let genres = JSON.parse(lStorage.getItem("genres"))
if (genres === null) {
}
let genres = JSON.parse(lStorage.getItem("genres"))
if (genres === null) {
- fetch("http://
localhost:8080
/genre")
+ fetch("http://
api.brackets.jacobcasper.com
/genre")
.then((response) => response.text())
.then((text) => {
window.localStorage.setItem("genres", text);
.then((response) => response.text())
.then((text) => {
window.localStorage.setItem("genres", text);