Solar System: Part 1 (Gwen and Virginia)#22
Open
virginiarare wants to merge 12 commits intoAda-C19:mainfrom
Open
Solar System: Part 1 (Gwen and Virginia)#22virginiarare wants to merge 12 commits intoAda-C19:mainfrom
virginiarare wants to merge 12 commits intoAda-C19:mainfrom
Conversation
apradoada
reviewed
Apr 28, 2023
apradoada
left a comment
There was a problem hiding this comment.
Great job! Just one small thing you could improve upon but overall well done!
| from .routes import planet_bp | ||
| app.register_blueprint(planet_bp) | ||
|
|
||
| return app |
|
|
||
| ] | ||
|
|
||
| planet_bp = Blueprint("planet_bp", __name__, url_prefix="/planets") |
There was a problem hiding this comment.
Great job setting up the planet class, the planet list and the planet blueprint!
| "name" : planet.name, | ||
| "description" : planet.description, | ||
| "distance" : planet.distance | ||
| } |
There was a problem hiding this comment.
This is a really good start! One thing you could do to make this just a little more streamlined would be to create a method in your planet class that converts the planet to a dictionary! Then you can just call the planet and return its dictionary form!
| if planet.id == planet_id: | ||
| return planet.dictionary | ||
|
|
||
| abort(make_response({"message":f"planet {planet_id} not found"}, 404)) No newline at end of file |
There was a problem hiding this comment.
The rest of this looks really great!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.