aboutsummaryrefslogtreecommitdiff
path: root/gn3/api/ctl.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/api/ctl.py')
-rw-r--r--gn3/api/ctl.py8
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)