Skip to content

Commit

Permalink
lab 6 forgot the template
Browse files Browse the repository at this point in the history
  • Loading branch information
Lofranlof committed Dec 4, 2023
1 parent 335ceb0 commit c4f60ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion JS/records.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c4f60ab

Please sign in to comment.