gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-survey] branch master updated: put next_url in tip s


From: gnunet
Subject: [GNUnet-SVN] [taler-survey] branch master updated: put next_url in tip spec
Date: Mon, 11 Dec 2017 17:12:14 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository survey.

The following commit(s) were added to refs/heads/master by this push:
     new 43debba  put next_url in tip spec
43debba is described below

commit 43debba1d355700339f8bf365ab09dea5c872c0a
Author: Florian Dold <address@hidden>
AuthorDate: Mon Dec 11 17:12:11 2017 +0100

    put next_url in tip spec
---
 talersurvey/survey/survey.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/talersurvey/survey/survey.py b/talersurvey/survey/survey.py
index 7be1e42..6c2f4c8 100644
--- a/talersurvey/survey/survey.py
+++ b/talersurvey/survey/survey.py
@@ -71,20 +71,22 @@ def utility_processor():
 
 @app.route("/tip-pickup", methods=["POST"])
 def pick():
-    body = flask.request.get_json()
-    resp = requests.post(urljoin(BACKEND_URL, 'tip-pickup'),
-                         json=body)
+    request_body = flask.request.get_json()
+    resp = requests.post(urljoin(BACKEND_URL, "tip-pickup"),
+                         json=request_body)
     if resp.status_code != 200:
         return backend_error(resp)
-    return flask.jsonify(resp.json())
+    response_body = resp.json()
+    return flask.jsonify(response_body)
 
 @app.route("/submit-survey", methods=["POST"])
 def submit_survey():
     tip_spec = dict(pickup_url=urljoin(flask.request.base_url, "/tip-pickup"),
                     amount=Amount(CURRENCY, 1).dump(),
+                    next_url=os.environ.get("TALER_ENV_URL_INTRO", 
"https://taler.net/";),
                     instance="default",
                     justification="Payment methods survey")
-    resp = requests.post(urljoin(BACKEND_URL, 'tip-authorize'),
+    resp = requests.post(urljoin(BACKEND_URL, "tip-authorize"),
                          json=tip_spec)
     if resp.status_code != 200:
         return backend_error(resp)

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]