Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
f8e9443ef8 |
2
VERSION
2
VERSION
@ -1 +1 @@
|
||||
0.0.2
|
||||
0.0.3
|
||||
|
@ -49,7 +49,8 @@
|
||||
filmsDiv.innerHTML = '<p class="loader">Recherche en cours...</p>';
|
||||
|
||||
try {
|
||||
const response = await fetch(`http://localhost:3000/search?q=${encodeURIComponent(query)}`);
|
||||
const base = window.location.origin;
|
||||
const response = await fetch(`${base}/search?q=${encodeURIComponent(query)}`);
|
||||
if (!response.ok) {
|
||||
// Gilfoyle: "The network, or your server, is garbage."
|
||||
filmsDiv.innerHTML = `<p class="no-results">Erreur: ${response.status} ${response.statusText || 'Impossible de joindre le backend.'}</p>`;
|
||||
|
Reference in New Issue
Block a user