Report new incident and set as fixed

This commit is contained in:
Matej Kramny
2015-07-19 21:32:26 +01:00
parent a710944218
commit b609679993
2 changed files with 7 additions and 20 deletions

View File

@@ -86,20 +86,6 @@ func (incident *Incident) Send() {
}
}
// GetSimilarIncidentID gets the same incident.
// Updates incident.ID
func (incident *Incident) GetSimilarIncidentID() {
incidents := GetIncidents()
for _, inc := range incidents {
if incident.Name == inc.Name && incident.Message == inc.Message && incident.Status == inc.Status {
incident.ID = inc.ID
Logger.Printf("Updated incident id to %v\n", inc.ID)
break
}
}
}
func (incident *Incident) fetchComponent() error {
_, body, err := makeRequest("GET", "/components/"+string(*incident.ComponentID), nil)
if err != nil {