added login info struct

This commit is contained in:
Valmo Trindade
2024-09-15 19:12:28 -03:00
parent 1e34020979
commit 1f548df283

View File

@@ -1,5 +1,5 @@
use arma_rs::FromArma;
use serde::Serialize;
use serde::{Deserialize, Serialize};
#[derive(Serialize)]
pub struct Marker {
@@ -55,13 +55,19 @@ impl FromArma for Marker {
}
}
#[derive(Serialize)]
#[derive(Debug, Serialize, Deserialize)]
pub struct LoginPayload {
pub address: String,
pub username: String,
pub password: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct LoginInfo {
pub username: String,
pub password: String
}
impl FromArma for LoginPayload {
fn from_arma(data: String) -> Result<Self, String> {
let (address, username, password) = <(String, String, String)>::from_arma(data)?;