diff options
-rw-r--r-- | frest/decorators.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/frest/decorators.py b/frest/decorators.py index 6f73a43..2939eb3 100644 --- a/frest/decorators.py +++ b/frest/decorators.py @@ -11,7 +11,7 @@ def check_token(f): if not headers.get("Authorization"): abort(403) - auth = request.headers.get("Authorization") + auth = headers.get("Authorization") token = Token.query.filter_by(string=auth).first() if not token: abort(403) @@ -28,8 +28,6 @@ def check_token(f): def admin_required(f): @wraps(f) def inner(*args, **kwargs): - header = request.headers - auth = request.headers.get("Authorization") token = Token.query.filter_by(string=auth).first() if not token.user.is_admin: |