fixed js
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user