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 <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2020-03-22 20:58:34 +01:00 committed by msehnout
parent 95203e0fff
commit bd86eaf6a5

View file

@ -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})
}