added address to LoginPayload

This commit is contained in:
Valmo Trindade
2024-09-12 12:32:47 -03:00
parent d581042814
commit 149d094659

View File

@@ -57,13 +57,18 @@ impl FromArma for Marker {
#[derive(Serialize)] #[derive(Serialize)]
pub struct LoginPayload { pub struct LoginPayload {
pub address: String,
pub username: String, pub username: String,
pub password: String, pub password: String,
} }
impl FromArma for LoginPayload { impl FromArma for LoginPayload {
fn from_arma(data: String) -> Result<Self, String> { fn from_arma(data: String) -> Result<Self, String> {
let (username, password) = <(String, String)>::from_arma(data)?; let (address, username, password) = <(String, String, String)>::from_arma(data)?;
Ok(Self { username, password }) Ok(Self {
address,
username,
password,
})
} }
} }