summaryrefslogtreecommitdiff
path: root/service/pixelated/resources/account_recovery_resource.py
diff options
context:
space:
mode:
authorTulio Casagrande <tuliocasagrande@gmail.com>2017-04-04 13:14:34 -0300
committerGitHub <noreply@github.com>2017-04-04 13:14:34 -0300
commitf70c2827d41d1d805d6446670b861b7abf0761b1 (patch)
treedf266fda0c593a27c568215716d48d9994fbd344 /service/pixelated/resources/account_recovery_resource.py
parentaf454c71da106644eee644c4286bbae4788b8e14 (diff)
parentd7914b9b5640c3d85c6230a032180b2e64520bca (diff)
Merge pull request #1042 from pixelated/login-recovery-code
[#935] Sends user recovery code and password to account recovery endpoint
Diffstat (limited to 'service/pixelated/resources/account_recovery_resource.py')
-rw-r--r--service/pixelated/resources/account_recovery_resource.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/service/pixelated/resources/account_recovery_resource.py b/service/pixelated/resources/account_recovery_resource.py
index 8cb10fc8..39ebb8d0 100644
--- a/service/pixelated/resources/account_recovery_resource.py
+++ b/service/pixelated/resources/account_recovery_resource.py
@@ -21,6 +21,8 @@ from twisted.python.filepath import FilePath
from pixelated.resources import get_public_static_folder
from twisted.web.http import OK
from twisted.web.template import Element, XMLFile, renderElement
+from twisted.web.server import NOT_DONE_YET
+from twisted.internet import defer
class AccountRecoveryPage(Element):
@@ -44,3 +46,16 @@ class AccountRecoveryResource(BaseResource):
def _render_template(self, request):
site = AccountRecoveryPage()
return renderElement(request, site)
+
+ def render_POST(self, request):
+ def success_response(response):
+ request.setResponseCode(OK)
+ request.finish()
+
+ def error_response(response):
+ request.setResponseCode(INTERNAL_SERVER_ERROR)
+ request.finish()
+
+ d = defer.succeed('Done!')
+ d.addCallbacks(success_response, error_response)
+ return NOT_DONE_YET