author-id-fix
This commit is contained in:
@@ -20,11 +20,11 @@ async fn get_author_id(user: &str) -> Result<i32, Box<dyn Error>> {
|
||||
variables.insert("user".to_string(), user.to_string());
|
||||
|
||||
let gql = json!({
|
||||
"query": format!("query {} {{ {}(slug: String, user: String, author_id: Int){{ id }} }}", operation, query_name),
|
||||
"query": format!("query {}($slug: String, $user: String, $author_id: Int) {{ {}(slug: $slug, user: $user, author_id: $author_id){{ id }} }}", operation, query_name),
|
||||
"operationName": operation,
|
||||
"variables": variables
|
||||
});
|
||||
|
||||
println!("[get_author_id] GraphQL: {}", gql);
|
||||
let client = HTTPClient::new();
|
||||
let response = client
|
||||
.post(&api_base)
|
||||
@@ -81,7 +81,7 @@ pub async fn get_id_by_token(token: &str) -> Result<i32, Box<dyn Error>> {
|
||||
"operationName": operation,
|
||||
"variables": variables
|
||||
});
|
||||
println!("GraphQL Query: {}", gql);
|
||||
// println!("GraphQL Query: {}", gql);
|
||||
let client = HTTPClient::new();
|
||||
let response = client
|
||||
.post(&auth_api_base)
|
||||
|
Reference in New Issue
Block a user