mirror of https://github.com/statping/statping
fmted stuff
parent
fb0b03bb37
commit
69a98f4b5b
|
@ -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")
|
||||
|
|
|
@ -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") != "" {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue