This commit is contained in:
Aevann1 2021-09-24 00:43:00 +02:00
parent 1092a66f54
commit c0486481c9

View file

@ -160,7 +160,7 @@ function getGif(searchTerm) {
cancelBtn.innerHTML = '<button class="btn btn-link pl-3 pr-0" id="gifs-cancel-btn" onclick="getGif();"><i class="fas fa-times text-muted"></i></button>';
var response = fetch("/giphy?searchTerm=" + searchTerm + "&limit=48")
var response = await fetch("/giphy?searchTerm=" + searchTerm + "&limit=48")
console.log(response)
var max = response.data.length - 1 //length of response, minus 1 (cuz array starts at index 0)
// GIF array