jluudev / arthurslastcrusade

https://arthurslastcrusade.onrender.com
0 stars 0 forks source link

Code Review Comments (Riley Froomin) #32

Open rcfroomin opened 4 months ago

rcfroomin commented 4 months ago
  1. Add docstrings to functions to clarify their purpose/parameters/expected return
  2. Develop the error handling in world/create_hero. Maybe a more descriptive error message, so you know what went wrong.
  3. Build on the error handling in dungeon/create_dungeon. Possibly a more descriptive error message, so you know what went wrong.
  4. Put in error handling in dungeon/create_monster. Right now, there is none. It would be helpful to know if an attempt to create a monster failed and why it did.
  5. Add error handling in guild/create_guild. Currently, there is none. It would be helpful to know if an attempt to create a monster failed and why it did.
  6. Remove unnecessary comments like on lines 49-51 in world.py.
  7. You could create more helper functions to simplify the longer functions in your code.
  8. Should the access token be in your .env file and not hardcoded in your example flows? I think this would make your project more secure.
  9. Make the error message in guild/recruit_hero more specific. Possibly separate the message depending on if the hero was not found or if it is already in a guild.
  10. In the world/create_hero endpoint, validate the level parameter to ensure it falls within a valid range and is of the correct data type.
  11. In the dungeon/create_dungeon endpoint, validate the level parameter to ensure it falls within a valid range and is of the correct data type.
  12. In the dungeon/create_monster endpoint, validate the level parameter to ensure it falls within a valid range and is of the correct data type.