JumboCode / OCCUR

MIT License
2 stars 0 forks source link

Validation for admin_views.py #62

Closed e-hat closed 3 years ago

e-hat commented 3 years ago

Created validation logic for the endpoints in admin_views.py so that no runtime errors were encountered.

There is very little code added in this PR because auth0 handles a lot of the more complicated validation errors, such as invalid email addresses, etc.

These changes only protect the python code in the endpoints from indexing the request with invalid keys, in a situation where the user of the API sends a request missing either email or name fields. The error format matches the errors returned by auth0.