From 15423b29ad55d5f8af245185b186f84091bdc3b2 Mon Sep 17 00:00:00 2001 From: joethei Date: Sun, 2 May 2021 08:17:13 +0200 Subject: [PATCH] add icon url --- src/server/WeatherServer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/WeatherServer.go b/src/server/WeatherServer.go index 0307a29..04b5044 100644 --- a/src/server/WeatherServer.go +++ b/src/server/WeatherServer.go @@ -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)