aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-tauri/src/lib.rs6
-rw-r--r--src-tauri/src/main.rs2
2 files changed, 5 insertions, 3 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 5d8d55e6..416efb64 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -358,18 +358,20 @@ pub fn convert_release_candidate_number(version_number: String) -> String {
/// Checks if installed FlightCore version is up-to-date
/// false -> FlightCore install is up-to-date
/// true -> FlightCore install is outdated
-pub fn check_is_flightcore_outdated() -> Result<bool, String> {
+pub async fn check_is_flightcore_outdated() -> Result<bool, String> {
// Get newest version number from GitHub API
println!("Checking GitHub API");
let url = "https://api.github.com/repos/GeckoEidechse/FlightCore/releases/latest";
let user_agent = "GeckoEidechse/FlightCore";
- let client = reqwest::blocking::Client::new();
+ let client = reqwest::Client::new();
let res = client
.get(url)
.header(reqwest::header::USER_AGENT, user_agent)
.send()
+ .await
.unwrap()
.text()
+ .await
.unwrap();
let json_response: serde_json::Value =
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index a0f502b6..9cc27e31 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -203,7 +203,7 @@ async fn check_is_northstar_outdated(
/// false -> FlightCore install is up-to-date
/// true -> FlightCore install is outdated
async fn check_is_flightcore_outdated_caller() -> Result<bool, String> {
- check_is_flightcore_outdated()
+ check_is_flightcore_outdated().await
}
#[tauri::command]