diff --git a/config/notifiers.go b/config/notifiers.go index 14bbe5255f..c92512b7e8 100644 --- a/config/notifiers.go +++ b/config/notifiers.go @@ -493,7 +493,7 @@ func (c *SigmaConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { defaultUrl, _ := url.Parse("https://online.sigmasms.ru/api/sendings") c.URL = &URL{URL: defaultUrl} } - if string(c.APIKey) == "" { + if c.APIKey == "" { return fmt.Errorf("api_key must be configured") } if c.NotificationType == "" { diff --git a/notify/sigma/sigma.go b/notify/sigma/sigma.go index a1816db632..fc58097284 100644 --- a/notify/sigma/sigma.go +++ b/notify/sigma/sigma.go @@ -86,7 +86,6 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) Text: tmplText(n.conf.Text), }, } - body, err := json.Marshal(msg) if err != nil { return false, err