mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 20:03:28 +00:00
added login info struct
This commit is contained in:
@@ -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)?;
|
||||
|
||||
Reference in New Issue
Block a user