debug-response-2

This commit is contained in:
Untone 2023-12-13 20:32:16 +03:00
parent 569df5ec76
commit 88f8f951ca

View File

@ -88,6 +88,9 @@ pub async fn get_id_by_token(token: &str) -> Result<i32, Box<dyn Error>> {
.send()
.await?;
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,6 +120,11 @@ pub async fn get_id_by_token(token: &str) -> Result<i32, Box<dyn Error>> {
format!("Request failed with status: {}", response.status()),
)))
}
*/
Err(Box::new(std::io::Error::new(
std::io::ErrorKind::Other,
"No user ID found in the response",
)))
}
async fn get_shout_followers(shout_id: &str) -> Result<Vec<i32>, Box<dyn Error>> {