diff options
author | Anike Arni <aarni@thoughtworks.com> | 2017-03-16 14:54:50 -0300 |
---|---|---|
committer | Anike Arni <aarni@thoughtworks.com> | 2017-03-16 14:54:50 -0300 |
commit | 3bc6901663c60e6b477477bd6e47e9f60fbb895b (patch) | |
tree | 9f4669ae0156ec5c06c740685a4c19fa24b0dded /service/pixelated | |
parent | f9ab38869b29eb4560b8b8f69c1dab191adfe782 (diff) |
[#1012] Extracts generation of recovery code to AccountRecovery
with @tayanefernandes
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/account_recovery.py | 4 | ||||
-rw-r--r-- | service/pixelated/resources/backup_account_resource.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/service/pixelated/account_recovery.py b/service/pixelated/account_recovery.py index 39614b4c..cca88760 100644 --- a/service/pixelated/account_recovery.py +++ b/service/pixelated/account_recovery.py @@ -24,9 +24,9 @@ class AccountRecovery(object): self._session = session @inlineCallbacks - def update_recovery_code(self, recovery_code): + def update_recovery_code(self): try: - response = yield self._session.update_recovery_code(recovery_code) + response = yield self._session.update_recovery_code('123') returnValue(response) except Exception as e: log.warn('Something went wrong when trying to save the recovery code') diff --git a/service/pixelated/resources/backup_account_resource.py b/service/pixelated/resources/backup_account_resource.py index 0b73bc35..7c66336f 100644 --- a/service/pixelated/resources/backup_account_resource.py +++ b/service/pixelated/resources/backup_account_resource.py @@ -59,6 +59,6 @@ class BackupAccountResource(BaseResource): request.setResponseCode(INTERNAL_SERVER_ERROR) request.finish() - d = account_recovery.update_recovery_code("123") + d = account_recovery.update_recovery_code() d.addCallbacks(update_response, error_response) return NOT_DONE_YET |