tsk-79: Simplifying functions (#92)

* tsk-79: Changed return type of function and cleaned up other functions

* tsk-79: Version bump

* tsk-79: Code formatting
This commit was merged in pull request #92.
This commit is contained in:
KD
2025-10-27 12:42:42 -04:00
committed by GitHub
parent 5c9fcf2ec5
commit abd16eeba2
4 changed files with 15 additions and 19 deletions
+6 -6
View File
@@ -61,7 +61,7 @@ impl Upload {
println!("Url: {url:?}");
let mut headers = reqwest::header::HeaderMap::new();
let (auth, auth_val) = syncers::common::auth_header(token).await;
let (auth, auth_val) = syncers::common::auth_header(token).await.unwrap();
headers.insert(auth, auth_val);
headers.insert("Accept", HeaderValue::from_str("*/*").unwrap());
headers.insert("Connection", HeaderValue::from_str("keep-alive").unwrap());
@@ -99,7 +99,7 @@ impl Upload {
let url = format!("{}/{endpoint}", self.api.url);
let mut headers = reqwest::header::HeaderMap::new();
let (auth, auth_val) = syncers::common::auth_header(token).await;
let (auth, auth_val) = syncers::common::auth_header(token).await.unwrap();
headers.insert(auth, auth_val);
let payload = serde_json::json!({
@@ -132,7 +132,7 @@ impl Upload {
let url = format!("{}/{endpoint}", self.api.url);
let mut headers = reqwest::header::HeaderMap::new();
let (auth, auth_val) = syncers::common::auth_header(token).await;
let (auth, auth_val) = syncers::common::auth_header(token).await.unwrap();
headers.insert(auth, auth_val);
let payload = serde_json::json!({
@@ -200,7 +200,7 @@ impl Upload {
println!("Url: {url:?}");
let mut headers = reqwest::header::HeaderMap::new();
let (auth, auth_val) = syncers::common::auth_header(token).await;
let (auth, auth_val) = syncers::common::auth_header(token).await.unwrap();
headers.insert(auth, auth_val);
headers.insert("Accept", HeaderValue::from_str("*/*").unwrap());
headers.insert("Connection", HeaderValue::from_str("keep-alive").unwrap());
@@ -239,7 +239,7 @@ impl Upload {
let url = format!("{}/{endpoint}", self.api.url);
let mut headers = reqwest::header::HeaderMap::new();
let (auth, auth_val) = syncers::common::auth_header(token).await;
let (auth, auth_val) = syncers::common::auth_header(token).await.unwrap();
headers.insert(auth, auth_val);
let payload = serde_json::json!({
@@ -271,7 +271,7 @@ impl Upload {
let url = format!("{}/{endpoint}", self.api.url);
let mut headers = reqwest::header::HeaderMap::new();
let (auth, auth_val) = syncers::common::auth_header(token).await;
let (auth, auth_val) = syncers::common::auth_header(token).await.unwrap();
headers.insert(auth, auth_val);
let payload = serde_json::json!({