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 ChannelsPage({socket}: {socket: WebSocket}) {
const [user, setUser] = useState<User>();
function deleteChannel(name: string) {
if (!window.confirm(`Are you sure you want to delete ${name}?`)) {
return;
}
axios
.post(`/api/channels/${name}/delete`, { token })
.catch((err) => {