Compare commits
1 Commits
master
...
hermes-rep
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
354e9d48fa |
@ -150,17 +150,7 @@ func statusForJobError(err error) int {
|
||||
}
|
||||
|
||||
func (a *App) handleWatch(w http.ResponseWriter, r *http.Request) {
|
||||
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)
|
||||
a.handleInternalWatch(w, r)
|
||||
}
|
||||
|
||||
func (a *App) handleIndex(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user