-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ref: Move get services out of API methods #4216
Conversation
@@ -19,11 +19,11 @@ def post_validate_code(code: Code): | |||
) | |||
except Exception as e: # noqa: BLE001 | |||
logger.opt(exception=True).debug("Error validating code") | |||
return HTTPException(status_code=500, detail=str(e)) | |||
raise HTTPException(status_code=500, detail=str(e)) |
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.
This was incorrect ?
d54aefe
to
d3c38e9
Compare
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
@italojohnny FYI
I had to rollback some changes on |
It doesn't have added value to put
get_xxx_service
methods inDepends
injections. It even makes the code harder to read.So this PR moves them to the code.
This PR also removes some
response_model
when they can be set as the method return type.