get-author-connector-2
This commit is contained in:
@@ -62,7 +62,7 @@ async fn get_author_id(user: &str) -> Result<i32, Box<dyn Error>> {
|
||||
}
|
||||
|
||||
|
||||
pub async fn get_auth_id(token: &str) -> Result<i32, Box<dyn Error>> {
|
||||
pub async fn get_user_id(token: &str) -> Result<i32, Box<dyn Error>> {
|
||||
let auth_api_base = env::var("AUTH_URL")?;
|
||||
let query_name = "validate_jwt_token";
|
||||
let operation = "ValidateToken";
|
||||
@@ -79,7 +79,7 @@ pub async fn get_auth_id(token: &str) -> Result<i32, Box<dyn Error>> {
|
||||
"operationName": operation,
|
||||
"variables": variables
|
||||
});
|
||||
|
||||
print!("{}", gql)
|
||||
let client = HTTPClient::new();
|
||||
let response = client
|
||||
.post(&auth_api_base)
|
||||
|
Reference in New Issue
Block a user