debug-response-4
This commit is contained in:
parent
10283bb777
commit
b0374d1a8a
18
src/data.rs
18
src/data.rs
|
@ -87,7 +87,11 @@ pub async fn get_id_by_token(token: &str) -> Result<i32, Box<dyn Error>> {
|
||||||
.json(&gql)
|
.json(&gql)
|
||||||
.send()
|
.send()
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
// Print the entire response body
|
||||||
|
let response_text = response.text().await?;
|
||||||
|
println!("Server Response: {}", response_text);
|
||||||
|
/*
|
||||||
if response.status().is_success() {
|
if response.status().is_success() {
|
||||||
let r: HashMap<String, serde_json::Value> = response.json().await?;
|
let r: HashMap<String, serde_json::Value> = response.json().await?;
|
||||||
let user_id = r
|
let user_id = r
|
||||||
|
@ -111,12 +115,12 @@ pub async fn get_id_by_token(token: &str) -> Result<i32, Box<dyn Error>> {
|
||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else { */
|
||||||
Err(Box::new(std::io::Error::new(
|
Err(Box::new(std::io::Error::new(
|
||||||
std::io::ErrorKind::Other,
|
std::io::ErrorKind::Other,
|
||||||
format!("Request failed with status: {}", response.status()),
|
format!("Request failed with status: {}", response_text),
|
||||||
)))
|
)))
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn get_shout_followers(shout_id: &str) -> Result<Vec<i32>, Box<dyn Error>> {
|
async fn get_shout_followers(shout_id: &str) -> Result<Vec<i32>, Box<dyn Error>> {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user