mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 20:06:04 +08:00
Process review comments.
CURA-7150
This commit is contained in:
parent
d11b3b0921
commit
61af28c681
@ -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…
x
Reference in New Issue
Block a user