From f22bf02c54159ddb7a6d76b6b29ee8b5ed80c0b4 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Fri, 2 Oct 2020 18:07:53 -0500 Subject: [PATCH] default HTML page to be loaded with plans --- src/api/index.py | 7 ++++++- src/config.json | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/api/index.py b/src/api/index.py index 5c59360..455a600 100755 --- a/src/api/index.py +++ b/src/api/index.py @@ -62,10 +62,15 @@ SYS_STORE = CONFIG['store'] # return render_template('donate.html',**args) @app.route("/") def index(): + if 'default' in CONFIG: + id = CONFIG['default']['id'] + return get_plans_ui(id) + headers = {"content-type":"application/json"} mystore = store.factory.instance(name='music') products = mystore.get.products() args = {"context":CONTEXT,"products":products} - return json.dumps(products),"content-type:application/json" + return json.dumps(products),headers + # return render_template("index.html",**args) @app.route("/json/") def get_plans_json(id): diff --git a/src/config.json b/src/config.json index df1736a..058dada 100644 --- a/src/config.json +++ b/src/config.json @@ -2,6 +2,7 @@ "about":{ "version":"0.4", "author":"The Phi Technology" + }, "stripe":{ "secret": "sk_test_I16uOM1ZfGALSc03AF0xqN2z", @@ -17,6 +18,9 @@ "exp_year":{"pattern":"^20[0-2]{2}"} } }, + "default":{ + "id":"healthcareio" + }, "cloud-view":"http://localhost/cloud-view/:id", "redir_url":"http://localhost/:context/oauth.html",