spiegel_podman/pkg/api/server/register_info.go
Steve Taylor 89b083f8b4 Register handlers without version to align with docker API
Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
2020-03-05 22:28:22 +00:00

28 lines
774 B
Go

package server
import (
"net/http"
"github.com/containers/libpod/pkg/api/handlers/generic"
"github.com/gorilla/mux"
)
func (s *APIServer) registerInfoHandlers(r *mux.Router) error {
// swagger:operation GET /info libpod libpodGetInfo
// ---
// tags:
// - system
// summary: Get info
// description: Returns information on the system and libpod configuration
// produces:
// - application/json
// responses:
// 200:
// description: to be determined
// 500:
// $ref: "#/responses/InternalError"
r.Handle(VersionedPath("/info"), s.APIHandler(generic.GetInfo)).Methods(http.MethodGet)
// Added non version path to URI to support docker non versioned paths
r.Handle("/info", s.APIHandler(generic.GetInfo)).Methods(http.MethodGet)
return nil
}