mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 18:03:30 +00:00
added login info struct
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
use arma_rs::FromArma;
|
use arma_rs::FromArma;
|
||||||
use serde::Serialize;
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
pub struct Marker {
|
pub struct Marker {
|
||||||
@@ -55,13 +55,19 @@ impl FromArma for Marker {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
pub struct LoginPayload {
|
pub struct LoginPayload {
|
||||||
pub address: String,
|
pub address: String,
|
||||||
pub username: String,
|
pub username: String,
|
||||||
pub password: String,
|
pub password: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
|
pub struct LoginInfo {
|
||||||
|
pub username: 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 (address, username, password) = <(String, String, String)>::from_arma(data)?;
|
let (address, username, password) = <(String, String, String)>::from_arma(data)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user