Skip to content

Commit

Permalink
edited heartbeat creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Fahri YARDIMCI committed Nov 4, 2019
1 parent 53e689b commit 43cd2c3
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 43cd2c3

Please sign in to comment.