From cdbce0323674155abebcb3033c8156c69076799d Mon Sep 17 00:00:00 2001 From: ashley Date: Sun, 28 Sep 2025 17:06:42 +0200 Subject: [PATCH] fix stuff + add stuff --- html/weather.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/weather.ejs b/html/weather.ejs index a0124dbd..45268724 100644 --- a/html/weather.ejs +++ b/html/weather.ejs @@ -576,7 +576,7 @@ main { async function searchPlaces(q){ if(!q) return []; - const url=`https://nominatim.openstreetmap.org/search?format=json&limit=5&addressdetails=1&q=${encodeURIComponent(q)}`; + const url = `/api/nominatim/search?format=json&limit=5&addressdetails=1&q=${encodeURIComponent(q)}`; const r=await fetch(url,{headers:{'Accept-Language':navigator.language}}); if(!r.ok) return []; return r.json(); @@ -695,7 +695,7 @@ main { }); function reverseName(lat,lon){ - const u=`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${lat}&lon=${lon}`; + const u=`/api/nominatim/reverse?format=jsonv2&lat=${lat}&lon=${lon}`; return fetch(u).then(r=>r.ok?r.json():null).then(j=>j?.display_name?.split(',').slice(0,2).join(', ')||`${lat.toFixed(3)},${lon.toFixed(3)}`); }