Conversation
audreyandoy
left a comment
There was a problem hiding this comment.
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 🔥 ✨
| if None: | ||
| return "Customer not found" |
There was a problem hiding this comment.
good job handling a missing/invalid customer!
| play=False | ||
| print("\n Thank you for visiting our store. Come again soon.") | ||
|
|
||
|
|
There was a problem hiding this comment.
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", | ||
| } |
There was a problem hiding this comment.
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.") | ||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
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.
| response = requests.post(self.url+"/rentals/check-in", | ||
| json=query_params) | ||
| return response.json() No newline at end of file |
There was a problem hiding this comment.
I think you meant to use response_body as the json you're passing into the request.
| 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() |
| response = requests.post(self.url+"/rentals/check-out", | ||
| json=query_params) | ||
| return response.json() |
There was a problem hiding this comment.
| 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() |
No description provided.