diff --git a/api/_examples/microsoft-teams-alert-channel/main.go b/api/_examples/microsoft-teams-alert-channel/main.go index 58b5d50c7..d2e2a17fe 100644 --- a/api/_examples/microsoft-teams-alert-channel/main.go +++ b/api/_examples/microsoft-teams-alert-channel/main.go @@ -18,7 +18,7 @@ func main() { myTeamsChannel := api.NewAlertChannel("microsoft-teams-alert-from-golang", api.MicrosoftTeamsAlertChannelType, api.MicrosoftTeamsData{ - TeamsUrl: "https://outlook.office.com/webhook/api-token", + TeamsURL: "https://outlook.office.com/webhook/api-token", }, ) diff --git a/api/alert_channels_microsoft_teams.go b/api/alert_channels_microsoft_teams.go index 6b5701d02..812a05699 100644 --- a/api/alert_channels_microsoft_teams.go +++ b/api/alert_channels_microsoft_teams.go @@ -32,7 +32,7 @@ func (svc *AlertChannelsService) UpdateMicrosoftTeams(data AlertChannel) (respon } type MicrosoftTeamsData struct { - TeamsUrl string `json:"teamsUrl"` + TeamsURL string `json:"teamsUrl"` } type MicrosoftTeamsAlertChannelV2 struct { diff --git a/api/alert_channels_microsoft_teams_test.go b/api/alert_channels_microsoft_teams_test.go index 82b6b18bf..5246e918a 100644 --- a/api/alert_channels_microsoft_teams_test.go +++ b/api/alert_channels_microsoft_teams_test.go @@ -58,7 +58,7 @@ func TestAlertChannelsGetMicrosoftTeams(t *testing.T) { assert.Equal(t, intgGUID, response.Data.IntgGuid) assert.Equal(t, "integration_name", response.Data.Name) assert.True(t, response.Data.State.Ok) - assert.Contains(t, response.Data.Data.TeamsUrl, "https://example.webhook.office.com/webwook123/abc") + assert.Contains(t, response.Data.Data.TeamsURL, "https://example.webhook.office.com/webwook123/abc") } func TestAlertChannelsMicrosoftTeamsUpdate(t *testing.T) { @@ -96,7 +96,7 @@ func TestAlertChannelsMicrosoftTeamsUpdate(t *testing.T) { emailAlertChan := api.NewAlertChannel("integration_name", api.MicrosoftTeamsAlertChannelType, api.MicrosoftTeamsData{ - TeamsUrl: "https://example.webhook.office.com/webwook123/abc", + TeamsURL: "https://example.webhook.office.com/webwook123/abc", }, ) assert.Equal(t, "integration_name", emailAlertChan.Name, "MicrosoftTeams cloud account name mismatch") @@ -109,7 +109,7 @@ func TestAlertChannelsMicrosoftTeamsUpdate(t *testing.T) { assert.NotNil(t, response) assert.Equal(t, intgGUID, response.Data.IntgGuid) assert.True(t, response.Data.State.Ok) - assert.Contains(t, response.Data.Data.TeamsUrl, "https://example.webhook.office.com/webwook123/abc") + assert.Contains(t, response.Data.Data.TeamsURL, "https://example.webhook.office.com/webwook123/abc") } func singleMicrosoftTeamsAlertChannel(id string) string { diff --git a/cli/cmd/integration_microsoft_teams.go b/cli/cmd/integration_microsoft_teams.go index ca3b6507a..3c1a3a9c3 100644 --- a/cli/cmd/integration_microsoft_teams.go +++ b/cli/cmd/integration_microsoft_teams.go @@ -53,7 +53,7 @@ func createMicrosoftTeamsChannelIntegration() error { teams := api.NewAlertChannel(answers.Name, api.MicrosoftTeamsAlertChannelType, api.MicrosoftTeamsData{ - TeamsUrl: answers.WebhookUrl, + TeamsURL: answers.WebhookUrl, }, )