dbg: excessive logging
This commit is contained in:
parent
eee6a76c69
commit
0097761c69
1 changed files with 19 additions and 5 deletions
24
src/lib.rs
24
src/lib.rs
|
@ -204,6 +204,7 @@ impl Client {
|
||||||
// if the key isnt set then we cant do anything.
|
// if the key isnt set then we cant do anything.
|
||||||
let api_key = match &self.base_key {
|
let api_key = match &self.base_key {
|
||||||
None => {
|
None => {
|
||||||
|
dbg!("No API Key");
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
Some(key) => key,
|
Some(key) => key,
|
||||||
|
@ -219,13 +220,26 @@ impl Client {
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
Ok(x) => {
|
Ok(x) => {
|
||||||
if let Ok(y) = x.json::<WolvesResultSingle<WolvesUserExists>>().await {
|
match x.json::<WolvesResultSingle<WolvesUserExists>>().await {
|
||||||
// this is the only time we will get a positive response, the None at the end catches everything else
|
Ok(y) => {
|
||||||
if let WolvesUserExists::S(z) = y.result {
|
// this is the only time we will get a positive response, the None at the end catches everything else
|
||||||
if let Ok(id) = z.parse::<i64>() {
|
match y.result {
|
||||||
return Some(id);
|
WolvesUserExists::S(z) => match z.parse::<i64>() {
|
||||||
|
Ok(id) => {
|
||||||
|
return Some(id);
|
||||||
|
}
|
||||||
|
Err(e) => {
|
||||||
|
dbg!(e);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
WolvesUserExists::B(b) => {
|
||||||
|
dbg!(b);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Err(e) => {
|
||||||
|
dbg!(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
|
|
Loading…
Reference in a new issue