Update Tester.HTML
This commit is contained in:
parent
db80776cd6
commit
99158495d7
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@
|
||||||
alert('Please enter a movie name.');
|
alert('Please enter a movie name.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fetch(`https://filmer.anorak01.top/api/search?search_query=${encodeURIComponent(movieName)}`)
|
fetch(`https://filmer.anorak.top/api/search?search_query=${encodeURIComponent(movieName)}`)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
displayResults(data);
|
displayResults(data);
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
let resultList = document.createElement('ul');
|
let resultList = document.createElement('ul');
|
||||||
results.forEach(result => {
|
results.forEach(result => {
|
||||||
let listItem = document.createElement('li');
|
let listItem = document.createElement('li');
|
||||||
listItem.textContent = result;
|
listItem.textContent = `Title: ${result.title}, Year: ${result.year}`;
|
||||||
resultList.appendChild(listItem);
|
resultList.appendChild(listItem);
|
||||||
});
|
});
|
||||||
searchResultsDiv.appendChild(resultList);
|
searchResultsDiv.appendChild(resultList);
|
||||||
|
|
Loading…
Add table
Reference in a new issue