From 6a3d37b6bb2e544fdf928dd22951cda45beba57a Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 13 Dec 2023 22:41:33 +0300 Subject: [PATCH] author-id-fix --- src/data.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data.rs b/src/data.rs index 49b1e83..5d85e40 100644 --- a/src/data.rs +++ b/src/data.rs @@ -20,11 +20,11 @@ async fn get_author_id(user: &str) -> Result> { 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> { "operationName": operation, "variables": variables }); - println!("GraphQL Query: {}", gql); + // println!("GraphQL Query: {}", gql); let client = HTTPClient::new(); let response = client .post(&auth_api_base)