added web interface

This commit is contained in:
wt committed 2024-05-24 12:17:50 +07:00
1 parent 821ca31cf1
commit 3bff581f23
14 files changed
+298 -64

No files matched your search

+19
View File
@@ -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>
`
}
}