diff options
author | MS <ms@taler.net> | 2020-07-24 14:31:26 +0200 |
---|---|---|
committer | MS <ms@taler.net> | 2020-07-24 14:31:26 +0200 |
commit | 50826ee741b56a53c963778f7cf9a58eec547960 (patch) | |
tree | 02dd20b8cf7c1385857f9efc33d185d543ee0147 /talermerchantdemos/survey/survey.py | |
parent | 6d7517078ba93c865557031f73eca41872df5656 (diff) | |
download | taler-merchant-demos-50826ee741b56a53c963778f7cf9a58eec547960.tar.gz taler-merchant-demos-50826ee741b56a53c963778f7cf9a58eec547960.tar.bz2 taler-merchant-demos-50826ee741b56a53c963778f7cf9a58eec547960.zip |
Adapt survey site.
Diffstat (limited to 'talermerchantdemos/survey/survey.py')
-rw-r--r-- | talermerchantdemos/survey/survey.py | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/talermerchantdemos/survey/survey.py b/talermerchantdemos/survey/survey.py index 52e4ede..15cb08c 100644 --- a/talermerchantdemos/survey/survey.py +++ b/talermerchantdemos/survey/survey.py @@ -40,8 +40,7 @@ CURRENCY = TC["taler"]["currency"].value_string(required=True) APIKEY = TC["frontends"]["backend_apikey"].value_string(required=True) app.config.from_object(__name__) LOGGER = logging.getLogger(__name__) -INSTANCED_URL = urljoin(BACKEND_URL, "/survey") - +INSTANCED_URL = urljoin(BACKEND_URL, f"instances/survey") ## # Make the environment available into templates. @@ -92,18 +91,6 @@ def favicon(): mimetype="image/vnd.microsoft.ico" ) - -## -# Give information about the tip reserve status. -# -# @return the backend response to a /tip-query request, -# in a prettified format. -@app.route("/survey-stats", methods=["GET"]) -def survey_stats(): - stats = backend_get(INSTANCED_URL, "tip-query", params=dict()) - return flask.render_template("templates/survey_stats.html", stats=stats) - - def get_qrcode_svg(data): factory = qrcode.image.svg.SvgImage img = qrcode.make(data, image_factory=factory) @@ -133,8 +120,8 @@ def submit_survey(): next_url=os.environ.get("TALER_ENV_URL_INTRO", "https://taler.net/"), justification="Payment methods survey" ) - backend_resp = backend_post(INSTANCED_URL, "tip-authorize", tip_spec) - taler_tip_uri = backend_resp.get("taler_tip_uri") + backend_resp = backend_post(INSTANCED_URL, "private/tips", tip_spec) + taler_tip_uri = backend_resp.get("tip_redirect_url") if taler_tip_uri: qrcode_svg = get_qrcode_svg(taler_tip_uri) content = flask.render_template( |