mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 00:37:50 -06:00
Process review comments.
CURA-7150
This commit is contained in:
parent
d11b3b0921
commit
61af28c681
1 changed files with 3 additions and 3 deletions
|
@ -18,8 +18,8 @@ class UltimakerCloudScope(DefaultUserAgentScope):
|
||||||
api = application.getCuraAPI()
|
api = application.getCuraAPI()
|
||||||
self._account = api.account # type: Account
|
self._account = api.account # type: Account
|
||||||
|
|
||||||
def request_hook(self, request: QNetworkRequest):
|
def requestHook(self, request: QNetworkRequest):
|
||||||
super().request_hook(request)
|
super().requestHook(request)
|
||||||
token = self._account.accessToken
|
token = self._account.accessToken
|
||||||
if not self._account.isLoggedIn or token is None:
|
if not self._account.isLoggedIn or token is None:
|
||||||
Logger.warning("Cannot add authorization to Cloud Api request")
|
Logger.warning("Cannot add authorization to Cloud Api request")
|
||||||
|
@ -28,4 +28,4 @@ class UltimakerCloudScope(DefaultUserAgentScope):
|
||||||
header_dict = {
|
header_dict = {
|
||||||
"Authorization": "Bearer {}".format(token)
|
"Authorization": "Bearer {}".format(token)
|
||||||
}
|
}
|
||||||
self.add_headers(request, header_dict)
|
self.addHeaders(request, header_dict)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue