commit 5b72f8bf8070b19b29e0e7f60c5b888a8ff6ea4b
parent a3e6faefa6a254a757dda08a3e876da388ad9f8e
Author: MS <ms@taler.net>
Date: Thu, 23 Jul 2020 17:36:51 +0200
fixes
Diffstat:
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git 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
@@ -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