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