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

import (
	"net/http"

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

func (s *APIServer) registerSystemHandlers(r *mux.Router) error {
	r.Handle(VersionedPath("/system/df"), s.APIHandler(generic.GetDiskUsage)).Methods(http.MethodGet)
	// Added non version path to URI to support docker non versioned paths
	r.Handle("/system/df", s.APIHandler(generic.GetDiskUsage)).Methods(http.MethodGet)
	return nil
}