From 051d022004d91cea75630cccbea43a2b652b5f4e Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 29 Jun 2020 09:34:02 +0200 Subject: fix: remove useless code --- frest/decorators.py | 4 +--- 1 file changed, 1 insertion(+), 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: -- cgit v1.2.3-18-g5258