Compare commits

..

3 Commits

Author SHA1 Message Date
24aa60cb48 Merge pull request 'Next release' (#25) from devel into main
All checks were successful
Rust Build / Check (push) Successful in 28s
Rust Build / Test Suite (push) Successful in 35s
Rust Build / Rustfmt (push) Successful in 28s
Rust Build / Clippy (push) Successful in 31s
Rust Build / build (push) Successful in 30s
Release Tagging / release (push) Successful in 34s
Reviewed-on: #25
2025-04-04 04:08:03 +00:00
d8eadb8187 Merge pull request 'v0.2.0 Release' (#20) from devel into main
Some checks failed
Rust Build / Check (push) Successful in 28s
Rust Build / Test Suite (push) Successful in 31s
Rust Build / Rustfmt (push) Successful in 31s
Rust Build / Clippy (push) Successful in 28s
Rust Build / build (push) Successful in 27s
Release Tagging / release (push) Failing after 34s
Reviewed-on: phoenix/icarus-models#20
2025-03-30 17:21:27 +00:00
2b2e96c02d Merge pull request 'devel' (#16) from devel into main
All checks were successful
Rust Build / Check (push) Successful in 26s
Rust Build / Test Suite (push) Successful in 26s
Rust Build / Rustfmt (push) Successful in 26s
Rust Build / Clippy (push) Successful in 26s
Rust Build / build (push) Successful in 26s
Release Tagging / release (push) Successful in 28s
Reviewed-on: phoenix/icarus-models#16
2025-03-22 21:24:15 +00:00

View File

@@ -27,8 +27,6 @@ pub struct User {
pub status: String, pub status: String,
#[serde(skip_serializing_if = "String::is_empty")] #[serde(skip_serializing_if = "String::is_empty")]
pub last_login: String, pub last_login: String,
#[serde(skip_serializing_if = "init::is_uuid_nil")]
pub salt_id: uuid::Uuid,
} }
impl Default for User { impl Default for User {
@@ -45,7 +43,6 @@ impl Default for User {
date_created: String::new(), date_created: String::new(),
status: String::new(), status: String::new(),
last_login: String::new(), last_login: String::new(),
salt_id: uuid::Uuid::nil(),
} }
} }
} }
@@ -59,29 +56,3 @@ impl User {
} }
} }
} }
pub mod salt {
use std::default::Default;
use crate::init;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct Salt {
#[serde(skip_serializing_if = "init::is_uuid_nil")]
pub id: uuid::Uuid,
#[serde(skip_serializing_if = "String::is_empty")]
pub salt: String,
}
impl Salt {
pub fn to_json(&self, output_pretty: bool) -> Result<String, serde_json::Error> {
if output_pretty {
serde_json::to_string_pretty(&self)
} else {
serde_json::to_string(&self)
}
}
}
}