diff --git a/Cargo.toml b/Cargo.toml index a028040..7059e77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libfj" -version = "0.5.2" +version = "0.5.3" authors = ["NGnius (Graham) "] edition = "2018" description = "An unofficial collection of APIs used in FreeJam games and mods" diff --git a/src/cardlife/live.rs b/src/cardlife/live.rs index f2485fd..7ef1846 100644 --- a/src/cardlife/live.rs +++ b/src/cardlife/live.rs @@ -37,22 +37,26 @@ impl LiveAPI { pub async fn authenticate_email(&mut self, email: &str, password: &str) -> Result { let url = Url::parse(AUTHENTICATION_DOMAIN) .unwrap() - .join("/api/auth/authenticate") + .join("api/auth/authenticate") .unwrap(); let payload = AuthenticationPayload { email_address: email.to_string(), password: password.to_string() }; - let result = self.client.post(url) + let result = self.client.post(url.clone()) .json(&payload) .send().await; if let Ok(response) = result { + //println!("Resp: {}", response.text().await.unwrap()); let res = response.json::().await; if let Ok(auth) = &res { self.auth = Some(auth.clone()); } return res; } + /*let result = self.client.post(url) + .json(&payload) + .send().await;*/ Err(result.err().unwrap()) } diff --git a/src/cardlife/live_json.rs b/src/cardlife/live_json.rs index 98547f6..161ab10 100644 --- a/src/cardlife/live_json.rs +++ b/src/cardlife/live_json.rs @@ -22,7 +22,7 @@ pub struct AuthenticationInfo { pub display_name: String, /// Account purchases (???) #[serde(rename = "Purchases")] - purchases: Vec, // ??? + purchases: Vec, // ??? /// Account flags (dev, admin, etc.???) #[serde(rename = "Flags")] flags: Vec, // ???