Skip to content

Commit b73e88c

Browse files
authored
feat(marketplace): add type filter to GetLocalImageByLabel (#1779)
1 parent f05d5b3 commit b73e88c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api/marketplace/v2/marketplace_utils.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ type GetLocalImageByLabelRequest struct {
4545
ImageLabel string
4646
Zone scw.Zone
4747
CommercialType string
48+
Type LocalImageType
4849
}
4950

5051
// GetLocalImageByLabel returns the local image for the given image label in the given zone and compatible with given commercial type
@@ -58,7 +59,8 @@ func (s *API) GetLocalImageByLabel(req *GetLocalImageByLabelRequest, opts ...scw
5859
resp, err := s.ListLocalImages(&ListLocalImagesRequest{
5960
ImageLabel: scw.StringPtr(req.ImageLabel),
6061
Zone: &req.Zone,
61-
})
62+
Type: req.Type,
63+
}, opts...)
6264
if err != nil {
6365
return nil, err
6466
}

0 commit comments

Comments
 (0)