From 354e9d48fae636622ca25389c36ec9f6fe43a088 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Fri, 7 Aug 2026 10:18:36 +0000 Subject: [PATCH] fix(hermes): Removes the duplicated implementation by reusing the existing handler, with no change to request or response behavior. (incident sonar/metis/go:S4144/AZ3Aes6wKy9i4pkIsOW8) --- pkg/service/server.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/pkg/service/server.go b/pkg/service/server.go index 7a29cfa..79ca30b 100644 --- a/pkg/service/server.go +++ b/pkg/service/server.go @@ -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) {