mirror of
https://github.com/FAUSheppy/jeffrey_miller_flask_ftp
synced 2025-12-09 20:28:33 +01:00
add js del user
This commit is contained in:
@@ -38,6 +38,15 @@ function submitForm(){
|
||||
xhr.send(formData);
|
||||
}
|
||||
|
||||
function deleteUser(username){
|
||||
xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", "/delete-user");
|
||||
xhr.onload = formSubmitFinished
|
||||
formData = new FormData();
|
||||
formData.append("username", username)
|
||||
xhr.send(formData);
|
||||
}
|
||||
|
||||
function formSubmitFinished(event){
|
||||
if(event.target.status < 200 || event.target.status >= 300){
|
||||
showErrorMessage(event.target); // blocking
|
||||
|
||||
Reference in New Issue
Block a user