generated from lucien/api-template
add: improved admin functions
This commit is contained in:
parent
4501f38b03
commit
1ec185330d
6 changed files with 87 additions and 2 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue