This commit is contained in:
Marcel Gansfusz
2025-11-04 17:13:18 +01:00
parent 8704aee82e
commit 8e74848397

View File

@@ -283,8 +283,9 @@ function submitPdf(eve) {
submitForm(formdata);
}
async function submitForm(formData) {
var updateEventSource = None;
try {
const updateEventSource = new EventSource("/get_censor_status/" + doc.fID);
updateEventSource = new EventSource("/get_censor_status/" + doc.fID);
modal.style.display = "flex";
// console.log("http://127.0.0.1:8000/get_censor_status/" + doc.fID);
@@ -304,7 +305,9 @@ async function submitForm(formData) {
method: "POST",
body: formData,
});
updateEventSource.close();
if (updateEventSource !== None) {
updateEventSource.close();
}
modal.style.display = "none";
//let responseJSON=await response.json();
if (response.ok) {