summaryrefslogtreecommitdiff
path: root/talermerchantdemos
diff options
context:
space:
mode:
authorMS <ms@taler.net>2020-07-23 17:36:51 +0200
committerMS <ms@taler.net>2020-07-23 17:36:51 +0200
commit5b72f8bf8070b19b29e0e7f60c5b888a8ff6ea4b (patch)
tree3f5543cfbc4b34df58da2de884fde5666c5602b8 /talermerchantdemos
parenta3e6faefa6a254a757dda08a3e876da388ad9f8e (diff)
downloadtaler-merchant-demos-5b72f8bf8070b19b29e0e7f60c5b888a8ff6ea4b.tar.gz
taler-merchant-demos-5b72f8bf8070b19b29e0e7f60c5b888a8ff6ea4b.tar.bz2
taler-merchant-demos-5b72f8bf8070b19b29e0e7f60c5b888a8ff6ea4b.zip
fixes
Diffstat (limited to 'talermerchantdemos')
-rw-r--r--talermerchantdemos/blog/blog.py2
-rw-r--r--talermerchantdemos/httpcommon/__init__.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/talermerchantdemos/blog/blog.py b/talermerchantdemos/blog/blog.py
index f23013a..52dba6f 100644
--- a/talermerchantdemos/blog/blog.py
+++ b/talermerchantdemos/blog/blog.py
@@ -32,7 +32,7 @@ from urllib.parse import urljoin
from cachelib import UWSGICache, SimpleCache
from taler.util.talerconfig import TalerConfig
from ..blog.content import ARTICLES, get_article_file, get_image_file
-from .httpcommon import backend_get, backend_post
+from talermerchantdemos.httpcommon import backend_get, backend_post
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
app = flask.Flask(__name__, template_folder=BASE_DIR)
diff --git a/talermerchantdemos/httpcommon/__init__.py b/talermerchantdemos/httpcommon/__init__.py
index 392eaa2..106e731 100644
--- a/talermerchantdemos/httpcommon/__init__.py
+++ b/talermerchantdemos/httpcommon/__init__.py
@@ -1,4 +1,6 @@
+import flask
import requests
+from urllib.parse import urljoin
##
# Return a error response to the client.
@@ -18,7 +20,7 @@ def err_abort(abort_status_code, **params):
# @param json the POST's body.
# @return the backend response (JSON format).
def backend_post(backend_url, endpoint, json):
- headers = {"Authorization": "ApiKey " + APIKEY}
+ headers = {"Authorization": "ApiKey sandbox"}
try:
resp = requests.post(
urljoin(backend_url, endpoint), json=json, headers=headers
@@ -51,7 +53,7 @@ def backend_post(backend_url, endpoint, json):
# @return the JSON response from the backend, or a error response
# if something unexpected happens.
def backend_get(backend_url, endpoint, params):
- headers = {"Authorization": "ApiKey " + APIKEY}
+ headers = {"Authorization": "ApiKey sandbox"}
try:
resp = requests.get(
urljoin(backend_url, endpoint), params=params, headers=headers