continuwuity/src/admin/fsck/mod.rs
Jason Volk 50ce87161b refactor admin command visibilities and use statements
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-17 02:10:27 +00:00

19 lines
437 B
Rust

mod commands;
use clap::Subcommand;
use conduit::Result;
use ruma::events::room::message::RoomMessageEventContent;
use self::commands::*;
#[cfg_attr(test, derive(Debug))]
#[derive(Subcommand)]
pub(super) enum FsckCommand {
CheckAllUsers,
}
pub(super) async fn process(command: FsckCommand, body: Vec<&str>) -> Result<RoomMessageEventContent> {
Ok(match command {
FsckCommand::CheckAllUsers => check_all_users(body).await?,
})
}