Skip to content

Commit

Permalink
Fix unmarshaling error with AlertGroupingParameters timeout
Browse files Browse the repository at this point in the history
Signed-off-by: mshen <[email protected]>
  • Loading branch information
mshen committed Aug 16, 2022
1 parent e23c1d0 commit adadee0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion service.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ type AlertGroupingParameters struct {

// AlertGroupParamsConfig is the config object on alert_grouping_parameters
type AlertGroupParamsConfig struct {
Timeout uint `json:"timeout,omitempty"`
Timeout *uint `json:"timeout,omitempty"`
Aggregate string `json:"aggregate,omitempty"`
Fields []string `json:"fields,omitempty"`
}
Expand Down
2 changes: 1 addition & 1 deletion service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func TestService_CreateWithAlertGroupParamsTime(t *testing.T) {
AlertGroupingParameters: &AlertGroupingParameters{
Type: "time",
Config: &AlertGroupParamsConfig{
Timeout: 2,
Timeout: new(uint),
},
},
}
Expand Down

0 comments on commit adadee0

Please sign in to comment.