Fixed a nasty bug related to lat/lon parsing

This commit is contained in:
2025-06-17 09:35:59 +02:00
parent dffec37d90
commit bac8c69382
4 changed files with 10 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ func GetWeather(res http.ResponseWriter, req *http.Request, cache *types.Cache[t
// Check whether the 'i' parameter(imperial mode) is specified
isImperial := req.URL.Query().Has("i")
weather, found := cache.GetCache(cityName, vars.TimeToLive)
weather, found := cache.GetEntry(cityName, vars.TimeToLive)
if found {
// Format weather values and then return it
weather.Temperature = fmtTemperature(weather.Temperature, isImperial)