summaryrefslogtreecommitdiff
path: root/pkg/api/server/register_version.go
blob: 25cacbc61995c65e2a7fe5697246c7d39442ec0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package server

import (
	"net/http"

	"github.com/containers/libpod/pkg/api/handlers/compat"
	"github.com/gorilla/mux"
)

func (s *APIServer) registerVersionHandlers(r *mux.Router) error {
	r.Handle("/version", s.APIHandler(compat.VersionHandler)).Methods(http.MethodGet)
	r.Handle(VersionedPath("/version"), s.APIHandler(compat.VersionHandler)).Methods(http.MethodGet)
	return nil
}