From 1ba6405bbc036f042747682641aee3aaab753637 Mon Sep 17 00:00:00 2001 From: gotjosh Date: Thu, 15 Dec 2022 11:51:45 -0400 Subject: [PATCH] Remove the dedicated field to APIURL in favour of the configuration one Signed-off-by: gotjosh --- notify/webex/webex.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/notify/webex/webex.go b/notify/webex/webex.go index d3e6ad63..9e95e3ed 100644 --- a/notify/webex/webex.go +++ b/notify/webex/webex.go @@ -40,7 +40,6 @@ type Notifier struct { logger log.Logger client *http.Client retrier *notify.Retrier - APIURL *config.URL } // New returns a new Webex notifier. @@ -56,7 +55,6 @@ func New(c *config.WebexConfig, t *template.Template, l log.Logger, httpOpts ... logger: l, client: client, retrier: ¬ify.Retrier{}, - APIURL: c.APIURL, } return n, nil @@ -102,7 +100,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) return false, err } - resp, err := notify.PostJSON(ctx, n.client, n.APIURL.String(), &payload) + resp, err := notify.PostJSON(ctx, n.client, n.conf.APIURL.String(), &payload) if err != nil { return true, notify.RedactURL(err) }