Rename parameter.
This commit is contained in:
parent
08bc80aa82
commit
d013e4cda8
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user