gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-blog] branch master updated: query article name


From: gnunet
Subject: [GNUnet-SVN] [taler-blog] branch master updated: query article name
Date: Sat, 31 Aug 2019 11:25:17 +0200

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

dold pushed a commit to branch master
in repository blog.

The following commit(s) were added to refs/heads/master by this push:
     new 355ecfe  query article name
355ecfe is described below

commit 355ecfe601469e9bd0dcc3cc384669c5138fa7d5
Author: Florian Dold <address@hidden>
AuthorDate: Sat Aug 31 11:25:12 2019 +0200

    query article name
---
 talerblog/blog/blog.py | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/talerblog/blog/blog.py b/talerblog/blog/blog.py
index fae9fea..46314f7 100644
--- a/talerblog/blog/blog.py
+++ b/talerblog/blog/blog.py
@@ -164,15 +164,6 @@ def index():
 
 
 ##
-# Serve the "/javascript" page.
-#
-# @return response object for the /javascript page.
-@app.route("/javascript")
-def javascript_licensing():
-    return flask.render_template("templates/javascript.html")
-
-
-##
 # @brief Cache for paid articles (in the form <session_id>-<article_name>),
 #        so we don't always have to ask the backend / DB, and so we don't
 #        have to store variable-size cookies on the client.
@@ -185,6 +176,15 @@ except ImportError:
 
 @app.route("/confirm-refund/<order_id>", methods=["GET"])
 def confirm_refund(order_id):
+    # Here we don't care about the session ID
+    pay_params = dict(instance=INSTANCE, order_id=order_id)
+    pay_status = backend_get("check-payment", pay_params)
+    if not pay_status.get("paid"):
+        err_abort(
+            400,
+            message="can't refund unpaid article",
+        )
+    article_name = resp["contract_terms"]["extra"]["article_name"]
     return flask.render_template(
         "templates/confirm_refund.html",
         article_name=article_name,

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



reply via email to

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