fix cscli alerts delete -all (#769)
Co-authored-by: AlteredCoder <AlteredCoder>
This commit is contained in:
parent
e82ad5704d
commit
a19f13ab45
|
@ -397,7 +397,8 @@ cscli alerts delete -s crowdsecurity/ssh-bf"`,
|
|||
alertDeleteFilter.Contains = new(bool)
|
||||
}
|
||||
} else {
|
||||
alertDeleteFilter = apiclient.AlertsDeleteOpts{}
|
||||
limit := 0
|
||||
alertDeleteFilter = apiclient.AlertsDeleteOpts{Limit: &limit}
|
||||
}
|
||||
alerts, _, err := Client.Alerts.Delete(context.Background(), alertDeleteFilter)
|
||||
if err != nil {
|
||||
|
|
|
@ -41,6 +41,7 @@ type AlertsDeleteOpts struct {
|
|||
ActiveDecisionEquals *bool `url:"has_active_decision,omitempty"`
|
||||
SourceEquals *string `url:"alert_source,omitempty"`
|
||||
Contains *bool `url:"contains,omitempty"`
|
||||
Limit *int `url:"limit,omitempty"`
|
||||
ListOpts
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue