mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 16:03:31 +00:00
removed useless logs
This commit is contained in:
12
src/util.rs
12
src/util.rs
@@ -38,19 +38,10 @@ pub async fn async_post_markers(data: Vec<Marker>) {
|
|||||||
let parsed_address: String =
|
let parsed_address: String =
|
||||||
data[0].api_address.clone() + "/api/markers?auth_token=" + &authentication_token;
|
data[0].api_address.clone() + "/api/markers?auth_token=" + &authentication_token;
|
||||||
|
|
||||||
let mut status: String = "fetching".to_string();
|
|
||||||
|
|
||||||
info!("{}", status);
|
|
||||||
|
|
||||||
for marker in data {
|
for marker in data {
|
||||||
let payload = parse_marker_to_payload(marker);
|
let payload = parse_marker_to_payload(marker);
|
||||||
let request_body = serde_json::to_string(&payload).unwrap();
|
let request_body = serde_json::to_string(&payload).unwrap();
|
||||||
|
|
||||||
info!(
|
|
||||||
"Parsing: {}, to {} with {}",
|
|
||||||
request_body, parsed_address, authentication_token
|
|
||||||
);
|
|
||||||
|
|
||||||
let response = client
|
let response = client
|
||||||
.post(&parsed_address)
|
.post(&parsed_address)
|
||||||
.body(request_body)
|
.body(request_body)
|
||||||
@@ -60,17 +51,14 @@ pub async fn async_post_markers(data: Vec<Marker>) {
|
|||||||
|
|
||||||
match response {
|
match response {
|
||||||
Ok(result) => {
|
Ok(result) => {
|
||||||
status = result.status().to_string();
|
|
||||||
info!("Received: {}", result.text().await.unwrap());
|
info!("Received: {}", result.text().await.unwrap());
|
||||||
}
|
}
|
||||||
Err(error) => {
|
Err(error) => {
|
||||||
status = "fetch failed".to_string();
|
|
||||||
error!("Error: {}", error)
|
error!("Error: {}", error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
info!("Final status: {}", status);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn blocking_fetch_auth_token(payload: LoginInfo, api_address: String) -> String {
|
pub fn blocking_fetch_auth_token(payload: LoginInfo, api_address: String) -> String {
|
||||||
|
|||||||
Reference in New Issue
Block a user