mirror of https://github.com/statping/statping
parent
d85c6e4280
commit
d5e346fa0e
|
@ -68,3 +68,10 @@ script:
|
|||
|
||||
after_success:
|
||||
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" = "false" ]]; then make travis-build; fi
|
||||
|
||||
webhooks:
|
||||
urls:
|
||||
- $GITTER
|
||||
on_success: change
|
||||
on_failure: always
|
||||
on_start: never
|
||||
|
|
|
@ -326,9 +326,12 @@ func servicesDeleteFailuresHandler(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
vars := mux.Vars(r)
|
||||
service := core.SelectService(utils.ToInt(vars["id"]))
|
||||
if service == nil {
|
||||
sendErrorJson(errors.New("service not found"), w, r)
|
||||
return
|
||||
}
|
||||
service.DeleteFailures()
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(service.AllFailures())
|
||||
sendJsonAction(service, "delete_failures", w, r)
|
||||
}
|
||||
|
||||
func apiServiceFailuresHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
Loading…
Reference in New Issue