get non private repositories of the collection
(collection types.Collection)
| 140 | |
| 141 | // get non private repositories of the collection |
| 142 | func (cc *CollectionComponent) GetPublicRepos(collection types.Collection) []types.CollectionRepository { |
| 143 | var filtered []types.CollectionRepository |
| 144 | for _, repo := range collection.Repositories { |
| 145 | if !repo.Private { |
| 146 | filtered = append(filtered, repo) |
| 147 | } |
| 148 | } |
| 149 | return filtered |
| 150 | } |
| 151 | |
| 152 | func (cc *CollectionComponent) UpdateCollection(ctx context.Context, input types.CreateCollectionReq) (*database.Collection, error) { |
| 153 | collection, err := cc.cs.GetCollection(ctx, input.ID) |