Clean up dead toolbox code and harden routing and static serving

This commit is contained in:
Shinuwa 2026-09-09 15:52:17 +02:00
parent 184314d913
commit cce3f3c7f8
9 changed files with 25 additions and 98 deletions

View file

@ -19,7 +19,10 @@ export function useAppData(route) {
setSiteContentError(error.message);
return null;
}),
fetch("/data/games.json").then((response) => response.ok ? response.json() : { games: [] }).catch((error) => {
fetch("/data/games.json").then((response) => {
if (!response.ok) throw new Error("Impossible de charger la liste des jeux.");
return response.json();
}).catch((error) => {
setGamesError(error.message);
return { games: [] };
})