diff options
-rw-r--r-- | wqflask/wqflask/views.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 1d50bdff..12b47ce9 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -1426,3 +1426,9 @@ def approve_data(name): f"{name}.approved")) return redirect("/data/approve/") + +@app.route("/display-file/<name>") +def display_file(name): + with open(os.path.join("/tmp/sample-data/diffs", name), 'r') as myfile: + content = myfile.read() + return Response(content, mimetype='text/json') |