Skip to content

Commit

Permalink
fix(teams): revert ChannelURL mapping to preserve backward compatibil…
Browse files Browse the repository at this point in the history
…ity with saved TICKscripts (influxdata#2571)
  • Loading branch information
sranka authored Jun 9, 2021
1 parent 5bbdec6 commit 53cf295
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pipeline/alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -2248,7 +2248,7 @@ type TeamsHandler struct {

// Teams channel webhook URL to post messages.
// If empty uses the URL from the configuration.
ChannelURL string `json:"channel-url"`
ChannelURL string `json:"channel_url"`
}

// Send the alert to ServiceNow.
Expand Down
2 changes: 1 addition & 1 deletion server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9457,7 +9457,7 @@ func TestServer_ListServiceTests(t *testing.T) {
Link: client.Link{Relation: client.Self, Href: "/kapacitor/v1/service-tests/teams"},
Name: "teams",
Options: client.ServiceTestOptions{
"channel-url": "",
"channel_url": "",
"alert_topic": "test kapacitor alert topic",
"alert_id": "foo/bar/bat",
"message": "test teams message",
Expand Down
2 changes: 1 addition & 1 deletion services/teams/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (s *Service) StateChangesOnly() bool {
}

type testOptions struct {
ChannelURL string `json:"channel-url"`
ChannelURL string `json:"channel_url"`
AlertTopic string `json:"alert_topic"`
AlertID string `json:"alert_id"`
Message string `json:"message"`
Expand Down

0 comments on commit 53cf295

Please sign in to comment.