Org endpoints use query/body model dependencies to perform initial db lookups.
Issue #6
Org ID path params have been replaced with either query params (get endpoints) or body values.
Resolves#10
Endpoints in other modules that rely on an org model lookup have also been updated.
ENVIRONMENT must be "local" and DISABLE_AUTH set for this to be active. Both of these default to production values to prevent this being enabled accidentally.
Resolves#5
- All TODOs done.
- org_model_dependency used for all applicable routes
- ORM relationships used to reduce number of queries being made and simplify endpoint code.
- Missing request and response models added.
- Small bug fixes
Blank contacts are now generated on org creation and assigned to each contact type. These contacts are linked to the org, only accessible to the org, and removed when the org is removed.
With this all contact endpoints have been removed. Contact manipulation is done via the org only.
No longer using .begin() and context manager. This means commits must be explicit (already were) but also, it allows for sanity checks within routes after commits.