Simple homelab monitoring service
0

Configure Feed

Select the types of activity you want to include in your feed.

Tidy up API routes code (remove comments etc)

Chris Walker (Jul 3, 2026, 8:46 PM +0100) 8f38c994 d3dbfabd

+2 -4
+2 -4
web/api.go
··· 10 10 ) 11 11 12 12 // health is a basic health endpoint, callable via monitoring scripts. 13 - // This is a very basic implementation which - if a request reaches it - 14 - // simply returns (204) No Content to the caller. 13 + // This is a very basic implementation which simply returns 204 (No 14 + // Content) to the caller. 15 15 func (a *app) health(w http.ResponseWriter, r *http.Request) { 16 16 // TODO. 17 17 w.WriteHeader(http.StatusNoContent) ··· 27 27 var services []models.Service 28 28 err := json.NewDecoder(r.Body).Decode(&services) 29 29 if err != nil { 30 - // TODO 31 30 http.Error(w, err.Error(), http.StatusBadRequest) 32 31 return 33 32 } ··· 49 48 return 50 49 } 51 50 52 - // Write back 53 51 w.Header().Set("Content-Type", "application/json") 54 52 w.WriteHeader(http.StatusOK) 55 53 if err := json.NewEncoder(w).Encode(list); err != nil {