mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
refactor: improve workflow
This commit is contained in:
@@ -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 {
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user