Rename parameter.

This commit is contained in:
Alexis Lahouze 2017-05-13 11:17:41 +02:00
parent 08bc80aa82
commit d013e4cda8
1 changed files with 3 additions and 3 deletions

View File

@ -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,