less-logs
This commit is contained in:
parent
3fbaa984ef
commit
c47364dc7a
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "discoursio-presence"
|
name = "discoursio-presence"
|
||||||
version = "0.2.15"
|
version = "0.2.16"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
|
@ -24,7 +24,7 @@ async fn get_author_id(user: &str) -> Result<i32, Box<dyn Error>> {
|
||||||
"operationName": operation,
|
"operationName": operation,
|
||||||
"variables": variables
|
"variables": variables
|
||||||
});
|
});
|
||||||
println!("[get_author_id] GraphQL: {}", gql);
|
// println!("[get_author_id] GraphQL: {}", gql);
|
||||||
let client = HTTPClient::new();
|
let client = HTTPClient::new();
|
||||||
let response = client
|
let response = client
|
||||||
.post(&api_base)
|
.post(&api_base)
|
||||||
|
@ -101,12 +101,12 @@ pub async fn get_id_by_token(token: &str) -> Result<i32, Box<dyn Error>> {
|
||||||
|
|
||||||
match user_id {
|
match user_id {
|
||||||
Some(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?;
|
let author_id = get_author_id(id).await?;
|
||||||
Ok(author_id as i32)
|
Ok(author_id as i32)
|
||||||
}
|
}
|
||||||
None => {
|
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(
|
Err(Box::new(std::io::Error::new(
|
||||||
std::io::ErrorKind::Other,
|
std::io::ErrorKind::Other,
|
||||||
"No user ID found in the response",
|
"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());
|
println!("Request failed with status: {}", response.status());
|
||||||
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!("[get_shout_followers] Request failed with status: {}", response.status()),
|
||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user