diff options
author | Santo Cariotti <dcariotti24@gmail.com> | 2020-06-29 09:34:02 +0200 |
---|---|---|
committer | Santo Cariotti <dcariotti24@gmail.com> | 2020-06-29 09:34:02 +0200 |
commit | 051d022004d91cea75630cccbea43a2b652b5f4e (patch) | |
tree | 34abfef58590d82e81e2882f8e7175db204ab1c4 | |
parent | 8156dd20c439b9070f87b5ed3ec671d1cd3edbc7 (diff) |
fix: remove useless code
-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: |