From 85d326fa6dce964ae592010b9938055308b446d9 Mon Sep 17 00:00:00 2001 From: phoenix Date: Fri, 29 May 2026 09:55:31 -0400 Subject: [PATCH 1/4] Added ServiceUser --- src/user/mod.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/user/mod.rs b/src/user/mod.rs index 5de18e2..56941f6 100644 --- a/src/user/mod.rs +++ b/src/user/mod.rs @@ -15,3 +15,15 @@ pub struct User { #[serde(with = "time::serde::rfc3339::option")] pub last_login: Option, } + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ServiceUser { + pub id: uuid::Uuid, + // TODO: Remove the omitempty tags at a later point + pub username: String, + pub passphrase: String, + pub created: Option, + // When serializing to json, if empty do not populate + #[serde(with = "time::serde::rfc3339::option")] + pub last_login: Option, +} -- 2.47.3 From 7e5758d0c99c2b56b1755aabe96a295d964d91db Mon Sep 17 00:00:00 2001 From: phoenix Date: Fri, 29 May 2026 09:55:50 -0400 Subject: [PATCH 2/4] cargo fmt --- src/user/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/user/mod.rs b/src/user/mod.rs index 56941f6..e68f3f7 100644 --- a/src/user/mod.rs +++ b/src/user/mod.rs @@ -20,10 +20,10 @@ pub struct User { pub struct ServiceUser { pub id: uuid::Uuid, // TODO: Remove the omitempty tags at a later point - pub username: String, - pub passphrase: String, - pub created: Option, + pub username: String, + pub passphrase: String, + pub created: Option, // When serializing to json, if empty do not populate #[serde(with = "time::serde::rfc3339::option")] - pub last_login: Option, + pub last_login: Option, } -- 2.47.3 From 210cf64d557ccf6e7244be07f85dbeb6c442b0bd Mon Sep 17 00:00:00 2001 From: phoenix Date: Fri, 29 May 2026 09:57:13 -0400 Subject: [PATCH 3/4] Removed comment --- src/user/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/user/mod.rs b/src/user/mod.rs index e68f3f7..463efdf 100644 --- a/src/user/mod.rs +++ b/src/user/mod.rs @@ -19,7 +19,6 @@ pub struct User { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct ServiceUser { pub id: uuid::Uuid, - // TODO: Remove the omitempty tags at a later point pub username: String, pub passphrase: String, pub created: Option, -- 2.47.3 From fc4c691fbf2bbc85ea293c88d5cc75cbc136cd05 Mon Sep 17 00:00:00 2001 From: phoenix Date: Fri, 29 May 2026 10:00:40 -0400 Subject: [PATCH 4/4] Added serde macro --- src/user/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/user/mod.rs b/src/user/mod.rs index 463efdf..8d8c934 100644 --- a/src/user/mod.rs +++ b/src/user/mod.rs @@ -21,6 +21,7 @@ pub struct ServiceUser { pub id: uuid::Uuid, pub username: String, pub passphrase: String, + #[serde(with = "time::serde::rfc3339::option")] pub created: Option, // When serializing to json, if empty do not populate #[serde(with = "time::serde::rfc3339::option")] -- 2.47.3