mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 05:45:59 +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()
|
||||
self._account = api.account # type: Account
|
||||
|
||||
def request_hook(self, request: QNetworkRequest):
|
||||
super().request_hook(request)
|
||||
def requestHook(self, request: QNetworkRequest):
|
||||
super().requestHook(request)
|
||||
token = self._account.accessToken
|
||||
if not self._account.isLoggedIn or token is None:
|
||||
Logger.warning("Cannot add authorization to Cloud Api request")
|
||||
@ -28,4 +28,4 @@ class UltimakerCloudScope(DefaultUserAgentScope):
|
||||
header_dict = {
|
||||
"Authorization": "Bearer {}".format(token)
|
||||
}
|
||||
self.add_headers(request, header_dict)
|
||||
self.addHeaders(request, header_dict)
|
||||
|
Loading…
x
Reference in New Issue
Block a user