added web interface
This commit is contained in:
1 parent
821ca31cf1
commit
3bff581f23
14 files changed
+298
-64
No files matched your search
@@ -0,0 +1,19 @@
|
||||
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)
|
||||
console.log(response)
|
||||
const alluserstablebody = document.querySelector('.alluserstablebody')
|
||||
// alluserstablebody.innerHTML = ""
|
||||
for (const user of response) {
|
||||
alluserstablebody.innerHTML += `
|
||||
<tr>
|
||||
<th>${user.id}</th>
|
||||
<th>${user.username}</th>
|
||||
<th>${user.group}</th>
|
||||
<th>${user.is_superuser}</th>
|
||||
</tr>
|
||||
`
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user