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

add numberMatched and numberReturned for /collections #197

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

vincentsarago
Copy link
Member

No description provided.

@vincentsarago vincentsarago requested a review from hrodmn February 6, 2025 09:37
@vincentsarago vincentsarago force-pushed the patch/collections-numberMatched-Returned branch from bcf6697 to 611e8b7 Compare February 6, 2025 09:40
@@ -148,6 +148,12 @@ async def all_collections( # noqa: C901
return Collections(
collections=linked_collections or [],
links=links,
numberMatched=collections_result.get(
"numberMatched", len(linked_collections)
),
Copy link
Member Author

Choose a reason for hiding this comment

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

numberMatched will not be set in collections_result when we're not using pgstac's collection-search so we set numberMatched to the len of returned collections

@vincentsarago vincentsarago merged commit 7392a67 into main Feb 6, 2025
7 checks passed
@vincentsarago vincentsarago deleted the patch/collections-numberMatched-Returned branch February 6, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant