Skip to content

Commit

Permalink
Merge pull request #20 from opsgenie/fix-hearbeat-add-request
Browse files Browse the repository at this point in the history
Edited heartbeat creation
  • Loading branch information
ErenKizilay authored Nov 4, 2019
2 parents 53e689b + 43cd2c3 commit 1fffb7e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions heartbeat/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ func (r UpdateRequest) Validate() error {
if r.Name == "" {
return errors.New("Invalid request. Name cannot be empty. ")
}
if &r.OwnerTeam == nil || (r.OwnerTeam.Id == "" && r.OwnerTeam.Name == "") {
return errors.New("Invalid request. Owner team cannot be empty. ")
}
if r.Interval < 1 {
return errors.New("Invalid request. Interval cannot be smaller than 1. ")
}
Expand All @@ -109,7 +106,7 @@ type AddRequest struct {
Interval int `json:"interval"`
IntervalUnit Unit `json:"intervalUnit"`
Enabled *bool `json:"enabled"`
OwnerTeam og.OwnerTeam `json:"ownerTeam"`
OwnerTeam og.OwnerTeam `json:"ownerTeam,omitempty"`
AlertMessage string `json:"alertMessage,omitempty"`
AlertTag []string `json:"alertTags,omitempty"`
AlertPriority string `json:"alertPriority,omitempty"`
Expand Down

0 comments on commit 1fffb7e

Please sign in to comment.