Fix duplicate AddUser calls
This commit is contained in:
@@ -47,7 +47,10 @@ async function render_table(data) {
|
||||
const users = Object.values(data.users);
|
||||
|
||||
const newusername = document.querySelector("#newusername");
|
||||
const newuserbutton = document.querySelector("#newuserbutton");
|
||||
const oldnewuserbutton = document.querySelector("#newuserbutton");
|
||||
var newuserbutton = oldnewuserbutton.cloneNode(true);
|
||||
oldnewuserbutton.parentNode.replaceChild(newuserbutton, oldnewuserbutton);
|
||||
|
||||
|
||||
newuserbutton.addEventListener("click", async () => {
|
||||
const r = await fetch(admin_api_path + 'add_user', {
|
||||
@@ -62,6 +65,7 @@ async function render_table(data) {
|
||||
return;
|
||||
}
|
||||
|
||||
newusername.value = "";
|
||||
update_table();
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user