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

[Issue #3447] Create API endpoint for GET /users/:userID/save-searches #3521

Merged

Conversation

mikehgrantsgov
Copy link
Collaborator

Summary

Fixes #3447

Time to review: 15 mins

Changes proposed

Create GET endpoint to return saved searched, accounting for enum values
Add unit tests

Context for reviewers

This is the final API required for saving user searches in this iteration.

Additional information

See unit tests

Copy link
Collaborator

@chouinar chouinar left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -297,3 +299,22 @@ def user_delete_saved_search(
)

return response.ApiResponse(message="Success")


@user_blueprint.get("/<uuid:user_id>/saved-searches")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if we should make this a POST endpoint - we might need to add some filters/sorting stuff (design dependent) and that would follow the same search request schema approach as our actual search endpoint.

Probably not that big a deal to switch later, but worth keeping in mind

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good call. This will be an easy switch when the requirements arrive.

@mikehgrantsgov mikehgrantsgov merged commit 476f3c8 into main Jan 15, 2025
@mikehgrantsgov mikehgrantsgov deleted the mikehgrantsgov/3447-create-get-endpoint-saved-searches branch January 15, 2025 14:57
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.

Create API endpoint for GET /users/:userID/save-searches
3 participants