diff --git a/JS/records.js b/JS/records.js index 0e815ae..6aaf5d7 100644 --- a/JS/records.js +++ b/JS/records.js @@ -5,7 +5,9 @@ document.addEventListener('DOMContentLoaded', async function () { const errorText = document.querySelector('.error_text'); try { - const fetchString = 'https://my-json-server.typicode.com/Lofranlof/MockRESTAPI/champions'; + const fetchString = (Math.floor(Math.random() * 2) === 0 ) + ? 'https://my-json-server.typicode.com/Lofranlof/MockRESTAPI/champions?benchPress_gte=130' + : 'https://my-json-server.typicode.com/Lofranlof/MockRESTAPI/champions?deadlift_gte=180' ; preloaderContainer.style.display = 'flex'; const response = await fetch(fetchString);