mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
refactor: rename to gpcommon
This commit is contained in:
15
gpcommon/src/cmd/disconnect.rs
Normal file
15
gpcommon/src/cmd/disconnect.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use super::{Command, CommandContext, CommandError};
|
||||
use crate::ResponseData;
|
||||
use async_trait::async_trait;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct Disconnect;
|
||||
|
||||
#[async_trait]
|
||||
impl Command for Disconnect {
|
||||
async fn handle(&self, context: CommandContext) -> Result<ResponseData, CommandError> {
|
||||
context.server_context.vpn().disconnect().await;
|
||||
Ok(ResponseData::Empty)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user