From cf7be58b2c160e2e1df737015c913fc1aff1dbe8 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Tue, 21 Jan 2020 12:44:50 -0600 Subject: Review corrections pass #2 Add API review comments to correct documentation and endpoints. Also, add a libpode prune method to reduce code duplication. Only used right now for the API but when the remote client is wired, we will switch over there too. Signed-off-by: Brent Baude --- pkg/api/handlers/generic/containers_create.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg/api/handlers/generic/containers_create.go') diff --git a/pkg/api/handlers/generic/containers_create.go b/pkg/api/handlers/generic/containers_create.go index f98872690..edefd5757 100644 --- a/pkg/api/handlers/generic/containers_create.go +++ b/pkg/api/handlers/generic/containers_create.go @@ -40,7 +40,9 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) { utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "Decode()")) return } - + if len(input.HostConfig.Links) > 0 { + utils.Error(w, utils.ErrLinkNotSupport.Error(), http.StatusBadRequest, errors.Wrapf(utils.ErrLinkNotSupport, "bad parameter")) + } newImage, err := runtime.ImageRuntime().NewFromLocal(input.Image) if err != nil { utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "NewFromLocal()")) -- cgit v1.2.3-54-g00ecf