add icon url

This commit is contained in:
joethei 2021-05-02 08:17:13 +02:00
parent f8c439a139
commit 15423b29ad

View File

@ -170,7 +170,7 @@ func ConvertCurrent(weatherData client.WeatherResponse) Current {
WindSpeed: weatherData.Current.WindSpeed,
WindDegree: weatherData.Current.WindDegree,
Description: weatherData.Current.Weather[0].Description,
Icon: weatherData.Current.Weather[0].Icon,
Icon: "https://openweathermap.org/img/wn/" + weatherData.Current.Weather[0].Icon + "@4x.png",
}
}
@ -197,7 +197,7 @@ func ConvertDaily(weatherData client.WeatherResponse) []Daily {
WindSpeed: weatherData.Daily[i].WindSpeed,
WindDegree: weatherData.Daily[i].WindDegree,
Description: weatherData.Daily[i].Weather[0].Description,
Icon: weatherData.Daily[i].Weather[0].Icon,
Icon: "https://openweathermap.org/img/wn/" + weatherData.Daily[i].Weather[0].Icon + "@4x.png",
ProbabilityOfPrecipitation: weatherData.Daily[i].PossibilityOfPrecipitation,
}
result = append(result, daily)