summaryrefslogtreecommitdiff
path: root/pkg/api/handlers
diff options
context:
space:
mode:
authorJakub Guzik <jakubmguzik@gmail.com>2021-03-12 00:03:03 +0100
committerJakub Guzik <jakubmguzik@gmail.com>2021-03-12 00:03:03 +0100
commit7b0155cf780f396f6ffc4455ae5825f5fc14ca79 (patch)
tree6969fbedbd7cf3363d7f39cdd84c7cd7179dc0bd /pkg/api/handlers
parente2d35e55d0ad77fcaca5bbe90276e9c47d514131 (diff)
downloadpodman-7b0155cf780f396f6ffc4455ae5825f5fc14ca79.tar.gz
podman-7b0155cf780f396f6ffc4455ae5825f5fc14ca79.tar.bz2
podman-7b0155cf780f396f6ffc4455ae5825f5fc14ca79.zip
Fix array instead of one elem network http api
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
Diffstat (limited to 'pkg/api/handlers')
-rw-r--r--pkg/api/handlers/libpod/networks.go2
-rw-r--r--pkg/api/handlers/libpod/swagger.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/api/handlers/libpod/networks.go b/pkg/api/handlers/libpod/networks.go
index a6c4f6d64..48cd37994 100644
--- a/pkg/api/handlers/libpod/networks.go
+++ b/pkg/api/handlers/libpod/networks.go
@@ -128,7 +128,7 @@ func InspectNetwork(w http.ResponseWriter, r *http.Request) {
utils.InternalServerError(w, err)
return
}
- utils.WriteResponse(w, http.StatusOK, reports)
+ utils.WriteResponse(w, http.StatusOK, reports[0])
}
// Connect adds a container to a network
diff --git a/pkg/api/handlers/libpod/swagger.go b/pkg/api/handlers/libpod/swagger.go
index 1bececa1a..2631f19ac 100644
--- a/pkg/api/handlers/libpod/swagger.go
+++ b/pkg/api/handlers/libpod/swagger.go
@@ -102,7 +102,7 @@ type swagNetworkRmReport struct {
// swagger:response NetworkInspectReport
type swagNetworkInspectReport struct {
// in:body
- Body []entities.NetworkInspectReport
+ Body entities.NetworkInspectReport
}
// Network list