Compare commits

..

No commits in common. "hermes-repair/sonar-AZ3Aes6wKy9i4pkIsOW8" and "master" have entirely different histories.

View File

@ -150,7 +150,17 @@ func statusForJobError(err error) int {
}
func (a *App) handleWatch(w http.ResponseWriter, r *http.Request) {
a.handleInternalWatch(w, r)
if r.Method != http.MethodPost {
http.Error(w, "method not allowed", http.StatusMethodNotAllowed)
return
}
event, err := a.WatchSentinel()
if err != nil {
a.metrics.RecordWatch("error")
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
writeJSON(w, http.StatusOK, event)
}
func (a *App) handleIndex(w http.ResponseWriter, r *http.Request) {