added web and fix some problems
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 9s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Successful in 14s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Failing after 8s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 9s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Successful in 14s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Failing after 8s
This commit is contained in:
1 parent
ccfc8b535e
commit
155c259ea9
29 files changed
+946
-119
No files matched your search
@@ -0,0 +1,24 @@
|
||||
const get_all_users = async () => {
|
||||
const response = await fetch(routes.all_users(), {
|
||||
method: "POST",
|
||||
body: `{"token":"${localStorage.getItem("token")}"}`
|
||||
}).then(data => data.json()).then(jsondata => jsondata).catch((error) => {
|
||||
notification(`Ошибка на сервере: ${error}`, "error")
|
||||
})
|
||||
const alluserstablebody = document.querySelector('#alluserstablebody')
|
||||
alluserstablebody.innerHTML = ""
|
||||
for (const user of response) {
|
||||
alluserstablebody.innerHTML += `
|
||||
<tr>
|
||||
<th><p>${user.id}</p></th>
|
||||
<th>${user.username}</th>
|
||||
<th>${user.email}</th>
|
||||
<th>${user.group}</th>
|
||||
<th>${user.is_superuser}</th>
|
||||
<th><button class="deleteuser btn btn-danger" id="${user.id}">Delete</button></th>
|
||||
<th><button class="changepassword btn btn-warning" id="${user.id}">Change password</button></th>
|
||||
<th><button class="changeuser btn btn-warning" id="${user.id}">Change user data</button></th>
|
||||
</tr>
|
||||
`
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user