dbg: excessive logging
Some checks failed
On_Push / lint_fmt (push) Failing after 18s
On_Push / lint_clippy (push) Failing after 10s
On_Push / test (push) Successful in 12s
On_Push / build (push) Has been skipped

This commit is contained in:
silver 2024-11-25 17:42:26 +00:00
parent eee6a76c69
commit 1c176d4f73
Signed by: silver
GPG key ID: 36F93D61BAD3FD7D

View file

@ -1,3 +1,4 @@
use std::num::ParseIntError;
use serde::{Deserialize, Serialize};
// This is what Wolves returns to us
@ -201,6 +202,7 @@ impl Client {
/// # })
/// ```
pub async fn get_member(self, email: &str) -> Option<i64> {
dbg!(&self.base_key);
// if the key isnt set then we cant do anything.
let api_key = match &self.base_key {
None => {
@ -210,7 +212,7 @@ impl Client {
};
let url = format!("{}/get_id_from_email", &self.base_wolves);
dbg!(&url);
match reqwest::Client::new()
.post(&url)
.form(&[("email", email)])
@ -219,12 +221,25 @@ impl Client {
.await
{
Ok(x) => {
if let Ok(y) = x.json::<WolvesResultSingle<WolvesUserExists>>().await {
match x.json::<WolvesResultSingle<WolvesUserExists>>().await {
Ok(y) => {
// this is the only time we will get a positive response, the None at the end catches everything else
if let WolvesUserExists::S(z) = y.result {
if let Ok(id) = z.parse::<i64>() {
match y.result {
WolvesUserExists::B(e) => {dbg!(e);}
WolvesUserExists::S(z) => {
match z.parse::<i64>() {
Ok(id) => {
return Some(id);
}
Err(e) => {
dbg!(e);
}
}
}
}
}
Err(e) => {
dbg!(e);
}
}
}