Compare commits

...

1 commit

Author SHA1 Message Date
sabban
42db90d904 fix issue https://github.com/crowdsecurity/crowdsec/issues/1627 2022-10-12 15:57:08 +02:00
3 changed files with 5 additions and 3 deletions

View file

@ -265,6 +265,7 @@ func NewAlert(leaky *Leaky, queue *Queue) (types.RuntimeAlert, error) {
StartAt: &startAt,
StopAt: &stopAt,
Simulated: &leaky.Simulated,
Labels: leaky.BucketConfig.Labels,
}
if leaky.BucketConfig == nil {
return runtimeAlert, fmt.Errorf("leaky.BucketConfig is nil")

View file

@ -44,7 +44,7 @@ type Alert struct {
ID int64 `json:"id,omitempty"`
// labels
Labels []string `json:"labels"`
Labels map[string]string `json:"labels,omitempty"`
// leakspeed
// Required: true

View file

@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://github.com/OAI/OpenAPI-Specification/blob/main/schemas/v3.0/schema.yaml
swagger: '2.0'
info:
version: 1.0.0
@ -748,8 +749,8 @@ definitions:
meta:
$ref: '#/definitions/Meta'
labels:
type: array
items:
type: object
additionalProperties:
type: string
required:
- scenario