Skip to content
Snippets Groups Projects
Commit 4d2926d8 authored by 희원 전's avatar 희원 전
Browse files

GET /musicSearch/{term}

parent 1115ff5a
Branches #24
No related tags found
No related merge requests found
Pipeline #8446 passed
This diff is collapsed.
...@@ -9,7 +9,7 @@ export default function SearchPage ({list, onSearch, onLike}) { ...@@ -9,7 +9,7 @@ export default function SearchPage ({list, onSearch, onLike}) {
event.preventDefault(); event.preventDefault();
console.log(searchWord); console.log(searchWord);
setSearchWord(''); setSearchWord('');
fetch (`http://itunes.apple.com/search?term=${searchWord}&entity=album`) fetch (`musicSearch/${searchWord}`)
.then(r => r.json()).then(r => { .then(r => r.json()).then(r => {
console.log(r); console.log(r);
onSearch(r.results); onSearch(r.results);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment