refactor: improve workflow

This commit is contained in:
Kevin Yue
2023-06-11 15:55:47 +08:00
parent 1af21432d4
commit 15e798c1e7
39 changed files with 950 additions and 683 deletions

View File

@@ -12,7 +12,7 @@ mod status;
pub use connect::Connect;
pub use disconnect::Disconnect;
pub use status::Status;
pub use status::GetStatus;
#[derive(Debug)]
pub(crate) struct CommandContext {

View File

@@ -4,10 +4,10 @@ use async_trait::async_trait;
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct Status;
pub struct GetStatus;
#[async_trait]
impl Command for Status {
impl Command for GetStatus {
async fn handle(&self, context: CommandContext) -> Result<ResponseData, CommandError> {
let status = context.server_context.vpn().status().await;