File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -358,18 +358,20 @@ pub fn convert_release_candidate_number(version_number: String) -> String {
358
358
/// Checks if installed FlightCore version is up-to-date
359
359
/// false -> FlightCore install is up-to-date
360
360
/// true -> FlightCore install is outdated
361
- pub fn check_is_flightcore_outdated ( ) -> Result < bool , String > {
361
+ pub async fn check_is_flightcore_outdated ( ) -> Result < bool , String > {
362
362
// Get newest version number from GitHub API
363
363
println ! ( "Checking GitHub API" ) ;
364
364
let url = "https://api.github.com/repos/GeckoEidechse/FlightCore/releases/latest" ;
365
365
let user_agent = "GeckoEidechse/FlightCore" ;
366
- let client = reqwest:: blocking :: Client :: new ( ) ;
366
+ let client = reqwest:: Client :: new ( ) ;
367
367
let res = client
368
368
. get ( url)
369
369
. header ( reqwest:: header:: USER_AGENT , user_agent)
370
370
. send ( )
371
+ . await
371
372
. unwrap ( )
372
373
. text ( )
374
+ . await
373
375
. unwrap ( ) ;
374
376
375
377
let json_response: serde_json:: Value =
Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ async fn check_is_northstar_outdated(
203
203
/// false -> FlightCore install is up-to-date
204
204
/// true -> FlightCore install is outdated
205
205
async fn check_is_flightcore_outdated_caller ( ) -> Result < bool , String > {
206
- check_is_flightcore_outdated ( )
206
+ check_is_flightcore_outdated ( ) . await
207
207
}
208
208
209
209
#[ tauri:: command]
You can’t perform that action at this time.
0 commit comments