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

Shark - Yonese and Philomena #18

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

yonesejames
Copy link

No description provided.

@yonesejames yonesejames changed the title Shark - Yonese J. Shark - Yonese and Philomena Apr 26, 2022
Copy link

@spitsfire spitsfire left a comment

Choose a reason for hiding this comment

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

Nicely done, Yonese and Philomena! I didn't find any red flags or any logic issues! Looks good!

Comment on lines +19 to +25
for planet in planets:
planets_response.append({
"id" : planet.id,
"name" : planet.name,
"description" : planet.description,
"habitable" : planet.habitable
})

Choose a reason for hiding this comment

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

this would make a nice instance method for the Planet class


db.session.commit()

return make_response(f"Planet {planet.id} successfully updated.")

Choose a reason for hiding this comment

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

while make_response will send a default code back with the response, it doesn't hurt to get in the habit of controlling our responses in a predictable way. If we sent a response code on line 40, then we should keep doing that will all our routes

@@ -0,0 +1,43 @@
import pytest

Choose a reason for hiding this comment

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

👍

@@ -0,0 +1,42 @@
import pytest

Choose a reason for hiding this comment

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

👍

Comment on lines +63 to +65
planet.name = request_body["name"]
planet.description = request_body["description"]
planet.habitable = request_body["habitable"]

Choose a reason for hiding this comment

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

we could make this into an instance method as well

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.

2 participants