moved HEADER_JSON copy to httpclient
This commit is contained in:
@ -11,10 +11,10 @@ def authenticated(func):
|
||||
if not issubclass(type(args[0]), HttpClient):
|
||||
raise AttributeError("First argument must be an instance of HttpClient")
|
||||
if "headers" in kwargs:
|
||||
kwargs["headers"]["Authorization"] = args[0].token
|
||||
kwargs["headers"] = kwargs["headers"].copy()
|
||||
else:
|
||||
kwargs["headers"] = {}
|
||||
kwargs["headers"]["Authorization"] = args[0].token
|
||||
kwargs["headers"]["Authorization"] = args[0].token
|
||||
|
||||
return func(*args, **kwargs)
|
||||
return authenticated_call
|
||||
|
Reference in New Issue
Block a user