debug-get-author
This commit is contained in:
parent
6a3d37b6bb
commit
39c4cf2d2a
11
src/data.rs
11
src/data.rs
|
@ -33,7 +33,15 @@ async fn get_author_id(user: &str) -> Result<i32, Box<dyn Error>> {
|
||||||
.send()
|
.send()
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
if response.status().is_success() {
|
|
||||||
|
// Print the entire response body
|
||||||
|
let response_text = response.text().await?;
|
||||||
|
Err(Box::new(std::io::Error::new(
|
||||||
|
std::io::ErrorKind::Other,
|
||||||
|
format!("Server Response: {}", response_text)
|
||||||
|
)))
|
||||||
|
|
||||||
|
/* 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 author_id = r
|
let author_id = r
|
||||||
.get("data")
|
.get("data")
|
||||||
|
@ -59,6 +67,7 @@ async fn get_author_id(user: &str) -> Result<i32, Box<dyn Error>> {
|
||||||
format!("Request failed with status: {}", response.status()),
|
format!("Request failed with status: {}", response.status()),
|
||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user