From 6fa1c30fb7c821991432e1c9a1b1c6ed23f0ec7c Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 20 Nov 2023 20:46:54 +0800 Subject: [PATCH] chore: update collection checks --- api/v2/collection_service.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/v2/collection_service.go b/api/v2/collection_service.go index 049c512..5bac48f 100644 --- a/api/v2/collection_service.go +++ b/api/v2/collection_service.go @@ -100,7 +100,9 @@ func (s *APIV2Service) GetCollectionByName(ctx context.Context, request *apiv2pb func (s *APIV2Service) CreateCollection(ctx context.Context, request *apiv2pb.CreateCollectionRequest) (*apiv2pb.CreateCollectionResponse, error) { if !s.LicenseService.IsFeatureEnabled(license.FeatureTypeUnlimitedAccounts) { - collections, err := s.Store.ListCollections(ctx, &store.FindCollection{}) + collections, err := s.Store.ListCollections(ctx, &store.FindCollection{ + VisibilityList: []store.Visibility{store.VisibilityWorkspace, store.VisibilityPublic}, + }) if err != nil { return nil, status.Errorf(codes.Internal, "failed to get collection list, err: %v", err) }