move metrics to /metrics.

This commit is contained in:
Miroslav Šedivý 2022-06-14 22:34:51 +00:00
parent 6deaa64884
commit ef7e9b1a53
2 changed files with 6 additions and 7 deletions

View file

@ -5,8 +5,6 @@ import (
"errors"
"net/http"
"github.com/prometheus/client_golang/prometheus/promhttp"
"gitlab.com/demodesk/neko/server/internal/api/members"
"gitlab.com/demodesk/neko/server/internal/api/room"
"gitlab.com/demodesk/neko/server/pkg/auth"
@ -64,11 +62,6 @@ func (api *ApiManagerCtx) Route(r types.Router) {
_, err := w.Write([]byte("true"))
return err
})
r.Get("/metrics", func(w http.ResponseWriter, r *http.Request) error {
promhttp.Handler().ServeHTTP(w, r)
return nil
})
}
func (api *ApiManagerCtx) Authenticate(w http.ResponseWriter, r *http.Request) (context.Context, error) {