Move the auth context methods into their own file so that we don't have auth trying to import itself
This commit is contained in:
parent
a120f6c64a
commit
61ca29de04
5 changed files with 12 additions and 14 deletions
|
@ -2,6 +2,7 @@ import logging
|
|||
|
||||
from app import mixpanel
|
||||
from flask import request, abort as flask_abort, jsonify
|
||||
from auth.auth_context import get_authenticated_user, get_validated_token
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -15,7 +16,6 @@ DEFAULT_MESSAGE[409] = 'Conflict'
|
|||
DEFAULT_MESSAGE[501] = 'Not Implemented'
|
||||
|
||||
def abort(status_code, message=None, issue=None, **kwargs):
|
||||
from auth.auth import get_authenticated_user, get_validated_token
|
||||
|
||||
message = (str(message) % kwargs if message else
|
||||
DEFAULT_MESSAGE.get(status_code, ''))
|
||||
|
|
Reference in a new issue