From d013e4cda8d6f512475e5d364b6216e907fca191 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Sat, 13 May 2017 11:17:41 +0200 Subject: [PATCH] Rename parameter. --- accountant/views/users.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/accountant/views/users.py b/accountant/views/users.py index a8d8fa9..7514b86 100644 --- a/accountant/views/users.py +++ b/accountant/views/users.py @@ -40,10 +40,10 @@ def load_user_from_auth(auth): return load_user_from_token(token) -def requires_auth(f): - @wraps(f) +def requires_auth(func): """Decorator to check user authentication before handling a request.""" + @wraps(func) def wrapped(*args, **data): """Check user authentication from requests headers and return 401 if unauthorized.""" @@ -56,7 +56,7 @@ def requires_auth(f): if user: g.user = user - return f(*args, **data) + return func(*args, **data) ns.abort( 401,