summaryrefslogtreecommitdiff
path: root/service/pixelated/resources
diff options
context:
space:
mode:
Diffstat (limited to 'service/pixelated/resources')
-rw-r--r--service/pixelated/resources/__init__.py3
-rw-r--r--service/pixelated/resources/backup_account_resource.py4
2 files changed, 6 insertions, 1 deletions
diff --git a/service/pixelated/resources/__init__.py b/service/pixelated/resources/__init__.py
index 61e60720..3b2a7118 100644
--- a/service/pixelated/resources/__init__.py
+++ b/service/pixelated/resources/__init__.py
@@ -122,6 +122,9 @@ class BaseResource(Resource):
def soledad(self, request):
return self._service(request, '_leap_session').soledad
+ def get_backup_email(self, request):
+ return json.loads(request.content.getvalue()).get('backupEmail')
+
class UnAuthorizedResource(Resource):
diff --git a/service/pixelated/resources/backup_account_resource.py b/service/pixelated/resources/backup_account_resource.py
index b752b4c7..677e9e75 100644
--- a/service/pixelated/resources/backup_account_resource.py
+++ b/service/pixelated/resources/backup_account_resource.py
@@ -51,7 +51,9 @@ class BackupAccountResource(BaseResource):
def render_POST(self, request):
account_recovery = AccountRecovery(
self._authenticator.bonafide_session,
- self.soledad(request))
+ self.soledad(request),
+ self._service(request, '_leap_session').smtp_config,
+ self.get_backup_email(request))
def update_response(response):
request.setResponseCode(NO_CONTENT)