aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/github
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-01-07 03:24:56 +0100
committerGitHub <noreply@github.com>2023-01-07 03:24:56 +0100
commit1ae404dc90a4aa922652e3bedcdee9c3b0016593 (patch)
treefe8e0a7e23a1b781dd7388dc5f7d5417e7b7cd92 /src-tauri/src/github
parent226bac84db9f37a7cd9e7247a77b6024108a7d9f (diff)
downloadFlightCore-1ae404dc90a4aa922652e3bedcdee9c3b0016593.tar.gz
FlightCore-1ae404dc90a4aa922652e3bedcdee9c3b0016593.zip
refactor: Store global const in separate file (#131)
Moved user agent there for now
Diffstat (limited to 'src-tauri/src/github')
-rw-r--r--src-tauri/src/github/release_notes.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src-tauri/src/github/release_notes.rs b/src-tauri/src/github/release_notes.rs
index a1d174fa..758f7ace 100644
--- a/src-tauri/src/github/release_notes.rs
+++ b/src-tauri/src/github/release_notes.rs
@@ -1,3 +1,4 @@
+use crate::constants::APP_USER_AGENT;
use serde::{Deserialize, Serialize};
use std::vec::Vec;
@@ -18,11 +19,10 @@ pub struct FlightCoreVersion {
async fn fetch_github_releases_api(url: &str) -> Result<String, String> {
println!("Fetching releases notes from GitHub API");
- let user_agent = "R2NorthstarTools/FlightCore";
let client = reqwest::Client::new();
let res = client
.get(url)
- .header(reqwest::header::USER_AGENT, user_agent)
+ .header(reqwest::header::USER_AGENT, APP_USER_AGENT)
.send()
.await
.unwrap()