From 538eaba37d7e06ef56c333c5935adbf8c635affb Mon Sep 17 00:00:00 2001 From: Ryan Peters Date: Fri, 2 Jun 2023 16:47:47 -0400 Subject: [PATCH] update weather alert messaging --- WeatherDashboard.Console/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WeatherDashboard.Console/Program.cs b/WeatherDashboard.Console/Program.cs index b42a93c..ec8259e 100644 --- a/WeatherDashboard.Console/Program.cs +++ b/WeatherDashboard.Console/Program.cs @@ -30,10 +30,11 @@ var apiUrl = configuration["ApiUrl"]; var gotifyUrl = configuration["GotifyUrl"]; var weatherSet = await httpClient.GetFromJsonAsync(apiUrl); +var todaysForecast = weatherSet.Forecast.FirstOrDefault().Summary; var notificationResponse = await httpClient.PostAsJsonAsync(gotifyUrl, new { title = "Weather Conditions", - message = $"{weatherSet.Current.ConditionName} and {weatherSet.Current.Temperature} degrees", + message = $"Today will be {todaysForecast.ConditionName} a high of {todaysForecast.HighTemp} and a low of {todaysForecast.LowTemp}. Currently, it is {weatherSet.Current.ConditionName} and {weatherSet.Current.Temperature} degrees.", priority = 5 }); \ No newline at end of file