Skip to content

Commit

Permalink
🏠 Using origin to fetch data
Browse files Browse the repository at this point in the history
  • Loading branch information
mandragora-hub committed Jan 27, 2024
1 parent ad6141c commit ff48961
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ form.addEventListener("submit", (e) => {
};

showLoading();
fetch("http://localhost:3000/api/v1/files/pdf", requestOptions)
fetch(`${location.origin}/api/v1/files/pdf`, requestOptions)
.then((response) => response.json())
.then((result) => showResults(result))
.catch((error) => showErrors(error));
Expand Down

0 comments on commit ff48961

Please sign in to comment.