Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: listAuthorizedProjectIDs should not get metadata #21555

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/server/v2.0/handler/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (r *repositoryAPI) listAuthorizedProjectIDs(ctx context.Context) ([]int64,
query.Keywords["public"] = true
}

projects, err := r.proCtl.List(ctx, query)
projects, err := r.proCtl.List(ctx, query, project.Detail(false))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can also set the WithMetadata to false.

Copy link
Author

@Czoyx Czoyx Feb 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think project.Detail(false) has set WithMetadata to false. But the explicit assignment is also OK

func (c *controller) assembleProjects(ctx context.Context, projects models.Projects, options ...Option) error {

if err != nil {
return nil, err
}
Expand Down
Loading