MLH-Fellowship / orientation-project-python-23.SUM.A

Orientation Project (Python) for 23.SUM.A
1 stars 12 forks source link

Feat/post request validation #29

Closed Raajheer1 closed 1 year ago

Raajheer1 commented 1 year ago

Issue #13 Added post request validation right now it ensures the body has the required keys and that they're in the correct datatype.

wrussell1999 commented 1 year ago

@Raajheer1 in future, make sure to comment on the issue before starting on it to prevent others duplicating code

Raajheer1 commented 1 year ago

@wrussell1999 There is! I changed the required fields to a dict and moved the request validation into its own function in 1c92f96

The only datatype being used is a string however I added support for integers as well as an example of how to extend the function to support other datatypes.