Refactor handler packages

To help with packaging, the handlers in pkg/api/handlers are now found
in pkg/api/handler/compat.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
This commit is contained in:
Jhon Honce
2020-03-09 14:18:44 +01:00
parent 684813fb3e
commit 31112e4b08
48 changed files with 752 additions and 753 deletions

View File

@ -1,13 +1,13 @@
package server
import (
"github.com/containers/libpod/pkg/api/handlers"
"github.com/containers/libpod/pkg/api/handlers/compat"
"github.com/gorilla/mux"
)
func (s *APIServer) registerPluginsHandlers(r *mux.Router) error {
r.Handle(VersionedPath("/plugins"), s.APIHandler(handlers.UnsupportedHandler))
r.Handle(VersionedPath("/plugins"), s.APIHandler(compat.UnsupportedHandler))
// Added non version path to URI to support docker non versioned paths
r.Handle("/plugins", s.APIHandler(handlers.UnsupportedHandler))
r.Handle("/plugins", s.APIHandler(compat.UnsupportedHandler))
return nil
}