fix: serde::json passing IVerge to the front end without deserialization

This commit is contained in:
huzibaca
2024-11-21 06:01:56 +08:00
parent 4d0dbdaced
commit a89a828b35
6 changed files with 169 additions and 27 deletions

View File

@@ -169,8 +169,10 @@ pub async fn patch_clash_config(payload: Mapping) -> CmdResult {
}
#[tauri::command]
pub fn get_verge_config() -> CmdResult<IVerge> {
Ok(Config::verge().data().clone())
pub fn get_verge_config() -> CmdResult<IVergeResponse> {
let verge = Config::verge();
let verge_data = verge.data().clone();
Ok(IVergeResponse::from(verge_data))
}
#[tauri::command]