diff --git a/src/admin/room/commands.rs b/src/admin/room/commands.rs index c85947a5..82267787 100644 --- a/src/admin/room/commands.rs +++ b/src/admin/room/commands.rs @@ -5,7 +5,7 @@ use tuwunel_core::{Err, Result}; use crate::{PAGE_SIZE, admin_command, get_room_info}; #[admin_command] -pub(super) async fn list_rooms( +pub(super) async fn room_list( &self, page: Option, exclude_disabled: bool, @@ -60,14 +60,14 @@ pub(super) async fn list_rooms( } #[admin_command] -pub(super) async fn exists(&self, room_id: OwnedRoomId) -> Result { +pub(super) async fn room_exists(&self, room_id: OwnedRoomId) -> Result { let result = self.services.metadata.exists(&room_id).await; self.write_str(&format!("{result}")).await } #[admin_command] -pub(super) async fn delete_room(&self, room_id: OwnedRoomId, force: bool) -> Result { +pub(super) async fn room_delete(&self, room_id: OwnedRoomId, force: bool) -> Result { if self.services.admin.is_admin_room(&room_id).await { return Err!("Cannot delete admin room"); } diff --git a/src/admin/room/mod.rs b/src/admin/room/mod.rs index 8bdfaa52..cc19d462 100644 --- a/src/admin/room/mod.rs +++ b/src/admin/room/mod.rs @@ -14,12 +14,11 @@ use self::{ }; use crate::admin_command_dispatch; -#[admin_command_dispatch] +#[admin_command_dispatch(handler_prefix = "room")] #[derive(Debug, Subcommand)] pub(super) enum RoomCommand { /// - List all rooms the server knows about - #[clap(alias = "list")] - ListRooms { + List { page: Option, /// Excludes rooms that we have federation disabled with @@ -58,7 +57,7 @@ pub(super) enum RoomCommand { }, /// - Delete room - DeleteRoom { + Delete { room_id: OwnedRoomId, #[arg(short, long)]