vars-fix-2
This commit is contained in:
parent
a25a24ee2e
commit
f042bbeb84
16
src/data.rs
16
src/data.rs
|
@ -90,10 +90,6 @@ pub async fn get_id_by_token(token: &str) -> Result<i32, Box<dyn Error>> {
|
|||
.send()
|
||||
.await?;
|
||||
|
||||
// Print the entire response body
|
||||
let response_text = response.text().await?;
|
||||
println!("Server Response: {}", response_text);
|
||||
/*
|
||||
if response.status().is_success() {
|
||||
let r: HashMap<String, serde_json::Value> = response.json().await?;
|
||||
let user_id = r
|
||||
|
@ -117,12 +113,12 @@ pub async fn get_id_by_token(token: &str) -> Result<i32, Box<dyn Error>> {
|
|||
)))
|
||||
}
|
||||
}
|
||||
} else { */
|
||||
Err(Box::new(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
format!("Request failed with status: {}", response_text),
|
||||
)))
|
||||
//}
|
||||
} else {
|
||||
Err(Box::new(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
format!("Request failed with status: {}", response_text),
|
||||
)))
|
||||
}
|
||||
}
|
||||
|
||||
async fn get_shout_followers(shout_id: &str) -> Result<Vec<i32>, Box<dyn Error>> {
|
||||
|
|
Loading…
Reference in New Issue
Block a user