-
Notifications
You must be signed in to change notification settings - Fork 0
added boilerplate for update_many_documents + modify_rush_settings (and added some API unittests for events)
#79
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
Conversation
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
jinyoungbang
left a comment
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.
See the comments and would love to see the reasoning behind the string null – apart from that, LGTM! Let's merge after I understand the design choice behind it.
chalicelib/api/events.py
Outdated
| @events_api.route("/events/rush/settings/{default_rush_category_id}", methods=["PATCH"], cors=True) | ||
| @auth(events_api, roles=["admin"]) | ||
| def modify_rush_settings(default_rush_category_id): | ||
| if default_rush_category_id == "null": |
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.
Could the string null ever popup?
chalicelib/modules/mongo.py
Outdated
| return False | ||
|
|
||
| @add_env_suffix | ||
| def update_many_documents(self, collection: str, filter_query: dict, update_query: dict, array_filters=None): |
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.
def update_many_documents(self, collection: str, filter_query: dict, update_query: dict, array_filters=None): -> dict
You could also potentially typecast the return value too
Lowkey I agree. I initially passed |
… dynamodb to fail)
events)
What does this PR do?
Added necessary backend changes to support frontend PR. This involved:
update_many_documentsfunction inside ofMongoModulemodify_rush_settingscalled by/events/rush/settings/{default_rush_category_id}API endpointType of change
Tests Performed
Screenshots
Additional Comments