mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 20:56:49 +00:00
refactor admin command visibilities and use statements
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
c6f4b20e17
commit
50ce87161b
30 files changed
+145
-152
No files matched your search
@@ -1,14 +1,14 @@
|
||||
pub(crate) mod server_commands;
|
||||
mod commands;
|
||||
|
||||
use clap::Subcommand;
|
||||
use conduit::Result;
|
||||
use ruma::events::room::message::RoomMessageEventContent;
|
||||
|
||||
use self::server_commands::*;
|
||||
use crate::Result;
|
||||
use self::commands::*;
|
||||
|
||||
#[cfg_attr(test, derive(Debug))]
|
||||
#[derive(Subcommand)]
|
||||
pub(crate) enum ServerCommand {
|
||||
pub(super) enum ServerCommand {
|
||||
/// - Time elapsed since startup
|
||||
Uptime,
|
||||
|
||||
@@ -57,7 +57,7 @@ pub(crate) enum ServerCommand {
|
||||
Shutdown,
|
||||
}
|
||||
|
||||
pub(crate) async fn process(command: ServerCommand, body: Vec<&str>) -> Result<RoomMessageEventContent> {
|
||||
pub(super) async fn process(command: ServerCommand, body: Vec<&str>) -> Result<RoomMessageEventContent> {
|
||||
Ok(match command {
|
||||
ServerCommand::Uptime => uptime(body).await?,
|
||||
ServerCommand::ShowConfig => show_config(body).await?,
|
||||
|
||||
Reference in new issue
Block a user