From 738f4b528486bfd1352aa29eff8293593745efd7 Mon Sep 17 00:00:00 2001 From: ThaaoBlues Date: Thu, 26 May 2022 14:44:17 +0200 Subject: [PATCH] fixed all deletion bug --- copypasta.py | 2 +- templates/index.html | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/copypasta.py b/copypasta.py index 817feaf..a7ccb83 100644 --- a/copypasta.py +++ b/copypasta.py @@ -344,7 +344,7 @@ def process(process_id): #empty the history files if process_id == "[DEL HISTORY]": - init_history_file() + init_history_file(force=True) return redirect("/") diff --git a/templates/index.html b/templates/index.html index a7e8693..6ba57ac 100644 --- a/templates/index.html +++ b/templates/index.html @@ -182,6 +182,8 @@

Last files/data sent :

xmlHttp.open( "GET", "http://127.0.0.1:21987/api/get_history", false ); // false for synchronous request xmlHttp.send( null ); var r = xmlHttp.responseText; + + if(r == "{\"history\" : []}"){ document.getElementById("history_table_body").innerHTML = ""; }else{