Remove unused alert envelope retention
This commit is contained in:
@@ -308,7 +308,7 @@ func (b *bundleBuilder) fetchAlerts(acquired sourceAcquisition) error {
|
||||
}
|
||||
raw, source := fetched.raw, fetched.source
|
||||
if isJSONNull(raw) {
|
||||
b.bundle.Alerts = &weatherdata.AlertRun{Raw: append(json.RawMessage(nil), raw...)}
|
||||
b.bundle.Alerts = &weatherdata.AlertRun{}
|
||||
b.addSource(source)
|
||||
return nil
|
||||
}
|
||||
@@ -316,7 +316,6 @@ func (b *bundleBuilder) fetchAlerts(acquired sourceAcquisition) error {
|
||||
if err := decodeSource(raw, &alerts); err != nil {
|
||||
return b.handleMalformed(&source, err, acquired.request)
|
||||
}
|
||||
alerts.Raw = append(json.RawMessage(nil), raw...)
|
||||
if alerts.AsOf != nil {
|
||||
source.IssuedAt = alerts.AsOf
|
||||
}
|
||||
|
||||
@@ -148,7 +148,6 @@ func (p ForecastPeriod) HasValidPrecipitationProbability() bool {
|
||||
type AlertRun struct {
|
||||
AsOf *time.Time `json:"asOf,omitempty"`
|
||||
Alerts []json.RawMessage `json:"alerts,omitempty"`
|
||||
Raw json.RawMessage `json:"raw,omitempty"`
|
||||
}
|
||||
|
||||
type Discussion struct {
|
||||
|
||||
Reference in New Issue
Block a user