add: improved admin functions

This commit is contained in:
Lukian 2025-04-20 19:52:05 +02:00
parent 4501f38b03
commit 1ec185330d
6 changed files with 87 additions and 2 deletions

View file

@ -13,6 +13,9 @@ export default function UsersPage({socket}: {socket: WebSocket}) {
const [thisUser, setThisUser] = useState<User>();
function deleteUser(username: string) {
if (!window.confirm(`Are you sure you want to delete ${username}?`)) {
return;
}
axios
.post(`/api/users/${username}/delete`, { token })
.catch((err) => {