diff --git a/Makefile.am b/Makefile.am index a1bee3d..56da37c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,7 +28,7 @@ mstored$(EXEEXT): $(mstored_SOURCES) $(EXTRA_mstored_SOURCES) env CGO_ENABLED=1 $(GO) build $(GOFLAGS) -o mstored$(EXEEXT) $(mstored_SOURCES) run: $(mstored_SOURCES) - cd cmd/mstored && env CGO_ENABLED=1 $(GO) run . + cd cmd/mstored && env CGO_ENABLED=1 $(GO) run . --asDaemon=false CWD=$(shell pwd) diff --git a/Makefile.in b/Makefile.in index 0e44324..0f33081 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1062,7 +1062,7 @@ mstored$(EXEEXT): $(mstored_SOURCES) $(EXTRA_mstored_SOURCES) env CGO_ENABLED=1 $(GO) build $(GOFLAGS) -o mstored$(EXEEXT) $(mstored_SOURCES) run: $(mstored_SOURCES) - cd cmd/mstored && env CGO_ENABLED=1 $(GO) run . + cd cmd/mstored && env CGO_ENABLED=1 $(GO) run . --asDaemon=false format: @dirs=$$($(FIND) $(CWD)/app $(CWD)/cmd $(CWD)/pkg $(CWD)/test \ diff --git a/app/operator/manifest.go b/app/operator/manifest.go index 5f9a155..3806ea2 100644 --- a/app/operator/manifest.go +++ b/app/operator/manifest.go @@ -476,13 +476,13 @@ type ListManifestsParams struct { N int64 } type ListManifestsResult struct { - Catalog []string `json:"repositories"` + Repositories []string `json:"repositories"` } func (oper *Operator) ListManifests(ctx context.Context, params *ListManifestsParams) (*ListManifestsResult, int, error) { var err error res := &ListManifestsResult{ - Catalog: make([]string, 0), + Repositories: make([]string, 0), } refMap := make(map[string]bool) descrs, err := oper.mdb.ListAllManifests(ctx) @@ -490,14 +490,14 @@ func (oper *Operator) ListManifests(ctx context.Context, params *ListManifestsPa return res, http.StatusInternalServerError, err } for _, descr := range descrs { - _, yet := refMap[descr.Reference] - if !yet { - refMap[descr.Reference] = true + _, already := refMap[descr.Name] + if !already { + refMap[descr.Name] = true } } for key, _ := range refMap { - res.Catalog = append(res.Catalog, key) + res.Repositories = append(res.Repositories, key) } - slices.Sort(res.Catalog) + slices.Sort(res.Repositories) return res, http.StatusOK, err } diff --git a/cmd/mstorectl/command/imagecmd.go b/cmd/mstorectl/command/imagecmd.go index ad54fac..e035e00 100644 --- a/cmd/mstorectl/command/imagecmd.go +++ b/cmd/mstorectl/command/imagecmd.go @@ -380,7 +380,7 @@ type CatalogImagesParams struct { } type CatalogImagesResult struct { - CatalogImages []string `json:"imageConfig"` + Repositories []string `json:"repositories"` } func (util *ImageUtil) CatalogImages(cmd *cobra.Command, args []string) { @@ -392,7 +392,7 @@ func (util *ImageUtil) CatalogImages(cmd *cobra.Command, args []string) { func (util *ImageUtil) catalogImages(common *CommonImageParams, params *CatalogImagesParams) (*CatalogImagesResult, error) { var err error res := &CatalogImagesResult{ - CatalogImages: make([]string, 0), + Repositories: make([]string, 0), } ctx := context.Background() @@ -408,6 +408,6 @@ func (util *ImageUtil) catalogImages(common *CommonImageParams, params *CatalogI if err != nil { return res, err } - res.CatalogImages = opres + res.Repositories = opres return res, err }