Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw exception if user hasn't passed a valid entity_type #91

Closed
joegasewicz opened this issue Nov 27, 2019 · 4 comments
Closed

Throw exception if user hasn't passed a valid entity_type #91

joegasewicz opened this issue Nov 27, 2019 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@joegasewicz
Copy link
Owner

https://github.com/joegasewicz/Flask-JWT-Router/blob/8a273366aaceeb4e21938f2cdb69257a74d584d4/flask_jwt_router/_authentication.py#L92

Check if entity_type kwarg exists, if not throw with a meaningful message to the user.

@joegasewicz joegasewicz added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Nov 27, 2019
@joegasewicz
Copy link
Owner Author

Also please update with tests.

@kousikmitra
Copy link
Contributor

what about this one @joegasewicz ?

@joegasewicz
Copy link
Owner Author

@kousikmitra Yes this is available, please go ahead.
Just an update:
This should throw an exception message back to the user to inform them to declare a entity_type kwarg when calling our API's register_entity method

jwt_routes.register_entity(entity_id=student.student_id, entity_type="students")

kousikmitra added a commit to kousikmitra/Flask-JWT-Router that referenced this issue Dec 5, 2019
kousikmitra added a commit to kousikmitra/Flask-JWT-Router that referenced this issue Dec 5, 2019
kousikmitra added a commit to kousikmitra/Flask-JWT-Router that referenced this issue Dec 5, 2019
joegasewicz pushed a commit that referenced this issue Dec 6, 2019
Changed the the `entity_type` kwarg to `table_name` #111 and `register_entity` now throws exception if user hasn't passed `table_name` #91
@joegasewicz
Copy link
Owner Author

This work has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants