Simplified the forecast schema
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
This commit is contained in:
@@ -118,8 +118,6 @@ func buildForecast(parsed nwsForecastResponse) (model.WeatherForecastRun, time.T
|
||||
providerDesc := strings.TrimSpace(p.ShortForecast)
|
||||
wmo := wmoFromNWSForecast(providerDesc, p.Icon, tempC)
|
||||
|
||||
canonicalText := standards.WMOText(wmo, isDay)
|
||||
|
||||
period := model.WeatherForecastPeriod{
|
||||
StartTime: start,
|
||||
EndTime: end,
|
||||
@@ -128,15 +126,9 @@ func buildForecast(parsed nwsForecastResponse) (model.WeatherForecastRun, time.T
|
||||
IsDay: isDay,
|
||||
|
||||
ConditionCode: wmo,
|
||||
ConditionText: canonicalText,
|
||||
|
||||
ProviderRawDescription: providerDesc,
|
||||
|
||||
// For forecasts, keep provider text as the human-facing description.
|
||||
TextDescription: strings.TrimSpace(p.ShortForecast),
|
||||
DetailedText: strings.TrimSpace(p.DetailedForecast),
|
||||
|
||||
IconURL: strings.TrimSpace(p.Icon),
|
||||
// For forecasts, keep provider short forecast text as the human-facing description.
|
||||
TextDescription: providerDesc,
|
||||
|
||||
TemperatureC: tempC,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user