(client_id: &str)
| 316 | } |
| 317 | |
| 318 | pub async fn disable_external_client(client_id: &str) -> Result<()> { |
| 319 | let service = create_client_service().await?; |
| 320 | let current = load_client_config_json(&service).await?; |
| 321 | if client_entry(¤t, client_id).is_none() { |
| 322 | bail!("ACP client '{}' is not configured", client_id); |
| 323 | } |
| 324 | let config_json = update_client_config_json(current, client_id, None, false, None)?; |
| 325 | save_client_config_json(&service, &config_json).await?; |
| 326 | println!("Disabled external ACP agent '{}'.", client_id); |
| 327 | Ok(()) |
| 328 | } |
| 329 | |
| 330 | pub async fn print_external_client_config() -> Result<()> { |
| 331 | let service = create_client_service().await?; |
no test coverage detected