Added afunctionality to readout wich page is currently being censored; It probably helps with patience; It is at the moment only implemented in the backend; A pretty frontend is still nessecerry

This commit is contained in:
Marcel Gansfusz
2025-10-22 01:12:25 +02:00
parent 7d828a7c3b
commit 352540a3b1
3 changed files with 69 additions and 4 deletions

View File

@@ -281,10 +281,18 @@ function submitPdf(eve) {
}
async function submitForm(formData) {
try {
const updateEventSource = new EventSource(
"http://127.0.0.1:8000/get_censor_status/" + doc.fID,
);
console.log("http://127.0.0.1:8000/get_censor_status/" + doc.fID);
updateEventSource.addEventListener("censorUpdate", function(eve) {
console.log(eve.data);
});
const response = await fetch("http://127.0.0.1:8000/submit", {
method: "POST",
body: formData,
});
updateEventSource.close();
//let responseJSON=await response.json();
if (response.ok) {
console.log("Submit OK");