Skip to content

YuliaP_Rock_Final Version.#70

Open
yukka-pukka wants to merge 1 commit intoAdaGold:mainfrom
yukka-pukka:main
Open

YuliaP_Rock_Final Version.#70
yukka-pukka wants to merge 1 commit intoAdaGold:mainfrom
yukka-pukka:main

Conversation

@yukka-pukka
Copy link

No description provided.

Copy link
Contributor

@audreyandoy audreyandoy left a comment

Choose a reason for hiding this comment

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

Good job Yuliya. You met the learning goals and most of the user stories. I found a bug in your rentals but it seems like an easy fix. I also added some comments for future refactoring.

Keep up the hard work 🔥 ✨

Comment on lines +59 to +60
if None:
return "Customer not found"
Copy link
Contributor

Choose a reason for hiding this comment

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

good job handling a missing/invalid customer!

play=False
print("\n Thank you for visiting our store. Come again soon.")


Copy link
Contributor

Choose a reason for hiding this comment

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

Great job separating the customer, rental, and video requests from the menu logic!

"11": "Check out a video",
"12": "Check in a video",
"00" : "Quit",
}
Copy link
Contributor

Choose a reason for hiding this comment

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

A future refactor could involve putting customer, video, and rental options in different menus.

print("\n Thank you for visiting our store. Come again soon.")



Copy link
Contributor

Choose a reason for hiding this comment

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

A future enhancement would involve handling 404s and empty responses from requests. Currently, your CLI crashes whenever invalid ids or invalid inputs are being processed. Preventing the app from crashing using try/excepts or even while loops would definitely improve the overall user experience of the CLI.

Comment on lines +22 to +24
response = requests.post(self.url+"/rentals/check-in",
json=query_params)
return response.json() No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you meant to use response_body as the json you're passing into the request.

Suggested change
response = requests.post(self.url+"/rentals/check-in",
json=query_params)
return response.json()
response = requests.post(self.url+"/rentals/check-in",
json=response_body)
return response.json()

Comment on lines +13 to +15
response = requests.post(self.url+"/rentals/check-out",
json=query_params)
return response.json()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
response = requests.post(self.url+"/rentals/check-out",
json=query_params)
return response.json()
response = requests.post(self.url+"/rentals/check-out",
json=response_body)
return response.json()

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