diff options
author | Alexander Kabui | 2022-02-01 00:29:01 +0300 |
---|---|---|
committer | BonfaceKilz | 2022-02-02 10:59:34 +0300 |
commit | cef01360b03c433145d05ed19eb21ec6e770eb5d (patch) | |
tree | ca1947bd10ff347da334ba1e4af7312d89bfe7f4 | |
parent | 5a55015a98b12f16b44f758c3f08d26ffc286313 (diff) | |
download | genenetwork3-cef01360b03c433145d05ed19eb21ec6e770eb5d.tar.gz |
return 401 on request fail
-rw-r--r-- | gn3/api/ctl.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gn3/api/ctl.py b/gn3/api/ctl.py index 05cf6ff..0844c95 100644 --- a/gn3/api/ctl.py +++ b/gn3/api/ctl.py @@ -16,9 +16,7 @@ def run_ctl(): """endpoint to run ctl""" ctl_data = request.json - results = call_ctl_script(ctl_data) - - return jsonify({ + (cmd_results, response) = call_ctl_script(ctl_data) + return (jsonify({ "results": results - }) - + }), 200) if response is not None else (jsonify({"error": str(cmd_results)}), 401) |