Finish implementation and tests for the cheat system #3
|
@ -83,9 +83,9 @@ class Revolut(object):
|
|||
settings.Revolut.RefreshToken = parsed["refresh_token"]
|
||||
settings.Revolut.SetupToken = "0"
|
||||
settings.write()
|
||||
self.log.info("Refreshed refresh token: {refresh_token}", refresh_token=settings.Revolut.RefreshToken)
|
||||
self.log.info("Refreshed refresh token")
|
||||
self.token = parsed["access_token"]
|
||||
self.log.info("Refreshed access token: {access_token}", access_token=self.token)
|
||||
self.log.info("Refreshed access token")
|
||||
except KeyError:
|
||||
self.log.error(f"Token authorization didn't contain refresh or access token: {parsed}", parsed=parsed)
|
||||
return False
|
||||
|
@ -119,7 +119,7 @@ class Revolut(object):
|
|||
if r.status_code == 200:
|
||||
if "access_token" in parsed.keys():
|
||||
self.token = parsed["access_token"]
|
||||
self.log.info("Refreshed access token: {access_token}", access_token=self.token)
|
||||
self.log.info("Refreshed access token")
|
||||
return True
|
||||
else:
|
||||
self.log.error(f"Token refresh didn't contain access token: {parsed}", parsed=parsed)
|
||||
|
|
Loading…
Reference in New Issue