From 3c8f72cfd68c20ae7059d9896ea619cf391c7d52 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Thu, 10 Jun 2021 17:42:52 +1000 Subject: [PATCH] added undelete route/function --- files.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/files.py b/files.py index f67421b..a93a91f 100644 --- a/files.py +++ b/files.py @@ -345,6 +345,18 @@ def rm_dups(): return render_template("base.html") +@app.route("/undelete_files", methods=["POST"]) +def undelete_files(): + jex=[] + for el in request.form: + print( f"{el}={request.form[el]}" ) + jex.append( JobExtra( name=f"{el}", value=request.form[el] ) ) + + job=NewJob( "undelete_files", 0, None, jex ) + st.SetAlert("success") + st.SetMessage( f"Created Job #{job.id} to undelete selected file(s)") + return render_template("base.html") + @app.route("/delete_files", methods=["POST"]) def delete_files(): jex=[]