-
Notifications
You must be signed in to change notification settings - Fork 14
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 #3293] Create POST /users/:userId/saved-opportunities API schema and stub endpoint #3330
[Issue #3293] Create POST /users/:userId/saved-opportunities API schema and stub endpoint #3330
Conversation
…https://github.com/HHS/simpler-grants-gov into mikehgrantsgov/3291-create-saved-opportunities-model
…nto mikehgrantsgov/3293-create-save-opp-api
Co-authored-by: Michael Chouinard <[email protected]>
…nto mikehgrantsgov/3293-create-save-opp-api
user = UserFactory.create() | ||
token, _ = create_jwt_for_user(user, db_session) | ||
db_session.commit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use a test utility that is like "get_test_user" that we'll eventually be able to pass things like roles into for a given unit test. Might be worth looking into setting that up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did abstract this slightly to remove duplication. I suppose the fixture I added could be added to conftest?
Co-authored-by: Michael Chouinard <[email protected]>
…nto mikehgrantsgov/3293-create-save-opp-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Summary
Fixes #3293
Time to review: 20 mins
Changes proposed
Create an API for users to save opportunities.
Make sure this API is scoped to the currently logged in user
Response body a basic success message
Additional information
See attached unit tests