refactor: migrate clash client info retrieval to MihomoManager

This commit is contained in:
Tunglies
2025-03-09 00:40:16 +08:00
parent adbf98cb15
commit 9f2c4b4f35
3 changed files with 22 additions and 31 deletions
+1 -9
View File
@@ -100,16 +100,8 @@ impl MihomoManager {
let payload = serde_json::json!({
"path": clash_config_path,
});
let response = self.send_request("PUT", url, Some(payload)).await?;
println!("put_configs_force::{:?}", response);
let _response = self.send_request("PUT", url, Some(payload)).await?;
Ok(())
// if response["code"] == 204 {
// Ok(())
// } else {
// Err(response["message"]
// .as_str()
// .unwrap_or("unknown error")
// .to_string())
}
pub async fn patch_configs(&self, config: serde_json::Value) -> Result<(), String> {