Pretty print environment info JSON using json.dumps()

This commit is contained in:
Peter Stockings
2023-12-18 22:16:23 +11:00
parent 9aa551a083
commit 4196d89440

2
app.py
View File

@@ -111,7 +111,7 @@ def get_http_function_edit_form():
if not http_function:
return jsonify({'error': 'Function not found'}), 404
script = http_function['script_content']
environment_info = json.dumps(http_function['environment_info'])
environment_info = json.dumps(http_function['environment_info'], indent=2)
return render_template("dashboard/http_functions/edit.html", name=name, script=script, environment_info=environment_info)
@ app.route("/dashboard/http_functions/edit", methods=["POST"])