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 SERVICE Routes
|
||||||
api.Handle("/api/services", scoped(apiAllServicesHandler)).Methods("GET")
|
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", authenticated(apiCreateServiceHandler, false)).Methods("POST")
|
||||||
api.Handle("/api/services/{id}", authenticatedV2(apiServiceHandler)).Methods("GET")
|
api.Handle("/api/services/{id}", authenticatedV2(apiServiceHandler)).Methods("GET")
|
||||||
api.Handle("/api/services/{id}/sub_services", scoped(apiAllSubServicesHandler)).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
|
return srvs
|
||||||
}
|
}
|
||||||
|
|
||||||
func apiAllServicesStatusHandler(w http.ResponseWriter, r *http.Request){
|
func apiAllServicesStatusHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
query := r.URL.Query()
|
query := r.URL.Query()
|
||||||
var t string
|
var t string
|
||||||
if query.Get("time") != "" {
|
if query.Get("time") != "" {
|
||||||
|
|
Loading…
Reference in New Issue