From a215f40105ef89be44dff0b1eac3218c71ded5ed Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 19 Jan 2023 20:58:56 +0000 Subject: Add GET method to /run_mapping allowing it to pull the start_vars from Redis when an id is provided --- wqflask/wqflask/views.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 5f91edc8..0a8f3105 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -677,9 +677,13 @@ def loading_page(): return rendered_template -@app.route("/run_mapping", methods=('POST',)) +@app.route("/run_mapping", methods=('POST','GET')) def mapping_results_page(): - initial_start_vars = request.form + if request.method == "GET": + initial_start_vars = json.loads(Redis.get(request.args.get("hash"))) + else: + initial_start_vars = request.form + temp_uuid = initial_start_vars['temp_uuid'] wanted = ( 'trait_id', -- cgit v1.2.3