diff --git a/src-tauri/src/controller_binaries.rs b/src-tauri/src/controller_binaries.rs index f17cff4b..82f3651e 100644 --- a/src-tauri/src/controller_binaries.rs +++ b/src-tauri/src/controller_binaries.rs @@ -492,7 +492,7 @@ pub async fn add_registry( .with_context(|| "Failed to insert into store")?; store.save().expect("failed to save store"); // Fetch services from the new registry - utils::fetch_all_services_manifest(®istries, &state) + utils::fetch_all_services_manifests(®istries, &state) .await .expect("failed to fetch services") } @@ -534,7 +534,7 @@ pub async fn delete_registry( drop(services_guard); if let Some(registries) = store.get("registries").cloned() { match serde_json::from_value::>(registries) { - Ok(registries) => utils::fetch_all_services_manifest(®istries, &state) + Ok(registries) => utils::fetch_all_services_manifests(®istries, &state) .await .expect("failed to fetch services"), Err(e) => println!("Error unwrapping registries: {:?}", e), diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 51729b99..3126bc5b 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -298,7 +298,7 @@ fn main() { Ok(_) => { if let Some(registries) = store.get("registries").cloned() { match serde_json::from_value::>(registries) { - Ok(registries) => utils::fetch_all_services_manifest(®istries, &app.state::>().clone()).await.unwrap_or_default(), + Ok(registries) => utils::fetch_all_services_manifests(®istries, &app.state::>().clone()).await.unwrap_or_default(), Err(e) => println!("Error unwrapping registries: {:?}", e) } } else { diff --git a/src-tauri/src/utils.rs b/src-tauri/src/utils.rs index 37c290c2..5686cd9a 100644 --- a/src-tauri/src/utils.rs +++ b/src-tauri/src/utils.rs @@ -5,7 +5,7 @@ use reqwest::get; use std::collections::HashMap; use std::sync::Arc; -pub async fn fetch_all_services_manifest( +pub async fn fetch_all_services_manifests( registries: &Vec, state: &Arc, ) -> Result<()> { @@ -25,7 +25,7 @@ pub async fn fetch_all_services_manifest( Ok(()) } -pub async fn fetch_services_manifests(url: &str, state: &Arc) -> Result<()> { +async fn fetch_services_manifests(url: &str, state: &Arc) -> Result<()> { let response = get(url) .await .with_context(|| format!("Couldn't fetch the manifest from {url:?}"))?;