summaryrefslogtreecommitdiff
path: root/pkg/api/server/register_version.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/server/register_version.go')
-rw-r--r--pkg/api/server/register_version.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/api/server/register_version.go b/pkg/api/server/register_version.go
new file mode 100644
index 000000000..94216b1b6
--- /dev/null
+++ b/pkg/api/server/register_version.go
@@ -0,0 +1,12 @@
+package server
+
+import (
+ "github.com/containers/libpod/pkg/api/handlers/generic"
+ "github.com/gorilla/mux"
+)
+
+func (s *APIServer) registerVersionHandlers(r *mux.Router) error {
+ r.Handle("/version", APIHandler(s.Context, generic.VersionHandler))
+ r.Handle(VersionedPath("/version"), APIHandler(s.Context, generic.VersionHandler))
+ return nil
+}