From bd86eaf6a57bf6144fda1869dcbcdd73646aa957 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sun, 22 Mar 2020 20:58:34 +0100 Subject: [PATCH] weldr/composeTypesHandler: list image types per-arch Currently all image types are supported on all arches, but in the future we may want to restrict this. In that case, return the image types that are valid for the arch in qusetion, rather than all the possible ones. Signed-off-by: Tom Gundersen --- internal/weldr/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/weldr/api.go b/internal/weldr/api.go index 247d5020d..b8ec3e03a 100644 --- a/internal/weldr/api.go +++ b/internal/weldr/api.go @@ -1532,7 +1532,7 @@ func (api *API) composeTypesHandler(writer http.ResponseWriter, request *http.Re Types []composeType `json:"types"` } - for _, format := range api.distro.ListOutputFormats() { + for _, format := range api.arch.ListImageTypes() { reply.Types = append(reply.Types, composeType{format, true}) }