diff --git a/src/users.rs b/src/users.rs index c8f1a10..ecf5131 100644 --- a/src/users.rs +++ b/src/users.rs @@ -186,18 +186,22 @@ pub async fn user_auth( let github_user = minreq::get("https://api.github.com/user") .with_header("User-Agent", "forge-registry") + .with_header("Accept", "application/vnd.github+json") .with_header("Authorization", format!("Bearer {}", gat)) .send() .unwrap(); let github_emails = minreq::get("https://api.github.com/user/emails") .with_header("User-Agent", "forge-registry") + .with_header("Accept", "application/vnd.github+json") .with_header("Authorization", format!("Bearer {}", gat)) .send() .unwrap() .json::>() .unwrap(); + log::debug!("{:?}", github_emails); + let primary_email = github_emails .iter() .find(|email| email.primary) @@ -206,6 +210,7 @@ pub async fn user_auth( .clone(); log::debug!("{}", github_user.as_str().unwrap()); + log::debug!("{}", primary_email); let github_user = serde_json::from_str::(github_user.as_str().unwrap()).unwrap(); let mby_user = Users::find()