less-logs
This commit is contained in:
@@ -24,7 +24,7 @@ async fn get_author_id(user: &str) -> Result<i32, Box<dyn Error>> {
|
||||
"operationName": operation,
|
||||
"variables": variables
|
||||
});
|
||||
println!("[get_author_id] GraphQL: {}", gql);
|
||||
// println!("[get_author_id] GraphQL: {}", gql);
|
||||
let client = HTTPClient::new();
|
||||
let response = client
|
||||
.post(&api_base)
|
||||
@@ -101,12 +101,12 @@ pub async fn get_id_by_token(token: &str) -> Result<i32, Box<dyn Error>> {
|
||||
|
||||
match user_id {
|
||||
Some(id) => {
|
||||
println!("User ID retrieved: {}", id);
|
||||
println!("[get_id_by_token] User ID retrieved: {}", id);
|
||||
let author_id = get_author_id(id).await?;
|
||||
Ok(author_id as i32)
|
||||
}
|
||||
None => {
|
||||
println!("No user ID found in the response");
|
||||
println!("[get_id_by_token] No user ID found in the response");
|
||||
Err(Box::new(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
"No user ID found in the response",
|
||||
@@ -154,7 +154,7 @@ async fn get_shout_followers(shout_id: &str) -> Result<Vec<i32>, Box<dyn Error>>
|
||||
println!("Request failed with status: {}", response.status());
|
||||
Err(Box::new(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
format!("Request failed with status: {}", response.status()),
|
||||
format!("[get_shout_followers] Request failed with status: {}", response.status()),
|
||||
)))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user