Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
f8e9443ef8 | |||
8762f28b27 |
@ -6,7 +6,7 @@
|
|||||||
"changelog": "file://CHANGELOG.md",
|
"changelog": "file://CHANGELOG.md",
|
||||||
"tagline": "Ciné-agrégateur multi-source pour enfants.",
|
"tagline": "Ciné-agrégateur multi-source pour enfants.",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"healthCheckPath": "/search?q=test",
|
"healthCheckPath": "/search",
|
||||||
"httpPort": 3000,
|
"httpPort": 3000,
|
||||||
"addons": {
|
"addons": {
|
||||||
"localstorage": {}
|
"localstorage": {}
|
||||||
|
@ -49,7 +49,8 @@
|
|||||||
filmsDiv.innerHTML = '<p class="loader">Recherche en cours...</p>';
|
filmsDiv.innerHTML = '<p class="loader">Recherche en cours...</p>';
|
||||||
|
|
||||||
try {
|
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) {
|
if (!response.ok) {
|
||||||
// Gilfoyle: "The network, or your server, is garbage."
|
// 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>`;
|
filmsDiv.innerHTML = `<p class="no-results">Erreur: ${response.status} ${response.statusText || 'Impossible de joindre le backend.'}</p>`;
|
||||||
|
Reference in New Issue
Block a user