summaryrefslogtreecommitdiff
path: root/talerblog/blog/blog.py
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-01-07 18:11:05 +0100
committerFlorian Dold <florian.dold@gmail.com>2018-01-07 18:11:05 +0100
commit96992ce671730227af0e1a4e0264d5a745553753 (patch)
tree73af537d21893f676634b9feb9468d903b65d81a /talerblog/blog/blog.py
parent2a17c7fafacc03fde148ca89c359a83d096c3e49 (diff)
downloadblog-96992ce671730227af0e1a4e0264d5a745553753.tar.gz
blog-96992ce671730227af0e1a4e0264d5a745553753.tar.bz2
blog-96992ce671730227af0e1a4e0264d5a745553753.zip
remove unnecessary param
Diffstat (limited to 'talerblog/blog/blog.py')
-rw-r--r--talerblog/blog/blog.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/talerblog/blog/blog.py b/talerblog/blog/blog.py
index e8bfa99..748ccac 100644
--- a/talerblog/blog/blog.py
+++ b/talerblog/blog/blog.py
@@ -142,16 +142,11 @@ def article(name, data=None):
session_id = flask.session["uid"] = uuid.uuid4()
pay_params = dict(
- instance=INSTANCE,
contract_url=make_url("/generate-contract", ("article_name", name)),
+ instance=INSTANCE,
+ order_id=flask.request.args.get("order_id"),
session_id=session_id,
session_sig=flask.request.args.get("session_sig"),
- order_id=flask.request.args.get("order_id"),
- # URL that the browser will navigate to after the user has paid (or
- # proved they already paid) with this session
- confirm_url = make_url("/essay/" + name,
- ("order_id", "${order_id}"),
- ("session_sig", "${session_sig}"))
)
resp = requests.get(urljoin(BACKEND_URL, "check-payment"), params=pay_params)
@@ -167,13 +162,13 @@ def article(name, data=None):
return flask.render_template("templates/article_refunded.html", article_name=name)
if pay_status.get("paid"):
- articleInfo = ARTICLES[name]
+ articleInfo = ARTICLES.get(name)
if articleInfo is None:
flask.abort(500)
if data is not None:
if data in article_info.extra_files:
return flask.send_file(get_image_file(data))
- return "permission denied", 400
+ return "permission denied", 403
return flask.render_template("templates/article_frame.html",
article_file=get_article_file(article_info),
article_name=name)