fence icon indicating copy to clipboard operation
fence copied to clipboard

refactor/db-calls: reduce DB usage

Open rudyardrichter opened this issue 6 years ago • 0 comments

Resolves #66.

Notable changes:

  • Removes the original get_current_user() usage; instead, uses current_user proxy which will do at most 1 lookup for user per request and store the user info from the database as a dictionary
  • Changes endpoints to use require_auth (instead of login_required) and use the current_token proxy where possible to get necessary information from the token instead of database
  • Changes MOCK_AUTH to be an entire fake token instead of a boolean, to support "stateless" mocked auth

Changes left:

  • Change storage manager setup to use token (place that only needs username)
  • Appease codacy

rudyardrichter avatar Mar 21 '18 22:03 rudyardrichter