diff --git a/handlers/routes.go b/handlers/routes.go index 5f7e2a2d..d2eb1018 100644 --- a/handlers/routes.go +++ b/handlers/routes.go @@ -131,7 +131,7 @@ func Router() *mux.Router { // API SERVICE Routes api.Handle("/api/services", scoped(apiAllServicesHandler)).Methods("GET") - api.Handle("/api/services/status", authenticated(apiAllServicesStatusHandler,false)).Methods("GET") + api.Handle("/api/services/status", authenticated(apiAllServicesStatusHandler, false)).Methods("GET") api.Handle("/api/services", authenticated(apiCreateServiceHandler, false)).Methods("POST") api.Handle("/api/services/{id}", authenticatedV2(apiServiceHandler)).Methods("GET") api.Handle("/api/services/{id}/sub_services", scoped(apiAllSubServicesHandler)).Methods("GET") diff --git a/handlers/services.go b/handlers/services.go index 7186c5c1..2174edf2 100644 --- a/handlers/services.go +++ b/handlers/services.go @@ -551,7 +551,7 @@ func apiAllServicesHandler(r *http.Request) interface{} { return srvs } -func apiAllServicesStatusHandler(w http.ResponseWriter, r *http.Request){ +func apiAllServicesStatusHandler(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() var t string if query.Get("time") != "" { diff --git a/types/services/struct.go b/types/services/struct.go index 0fdc649d..179a423b 100644 --- a/types/services/struct.go +++ b/types/services/struct.go @@ -14,7 +14,7 @@ import ( type ServiceWithDowntime struct { Service - Downtime *downtimes.Downtime `gorm:"-" json:"downtime" yaml:"-"` + Downtime *downtimes.Downtime `gorm:"-" json:"downtime" yaml:"-"` } // Service is the main struct for Services