From 68cfb26316b17c60a8fa19eb911730739e6511c7 Mon Sep 17 00:00:00 2001 From: nugroho Date: Tue, 20 May 2025 15:57:38 +0700 Subject: [PATCH] safeuser refactor --- Partials.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Partials.cs b/Partials.cs index 3c389a1..e61c2bd 100644 --- a/Partials.cs +++ b/Partials.cs @@ -12,11 +12,11 @@ internal partial record PasswdUser(string Username, string PlainPassword); internal partial record SafeUser(string Username, string AgentID, byte Level, bool Active) { internal static SafeUser FromUser(User Source) { - return new(Source.Username, Source.Name, Source.Level, Source.Active); + return new(Source.Username, Source.AgentID, Source.Level, Source.Active); } }; internal partial record SimpleApiResponse(int Status, string Message); -internal partial record User(string Username, string Name, string Password, byte Level, bool Active); +internal partial record User(string Username, string AgentID, string Password, byte Level, bool Active); [JsonSerializable(typeof(Agent))] [JsonSerializable(typeof(ApiResponse))] [JsonSerializable(typeof(Deployment))] @@ -29,6 +29,7 @@ internal partial record User(string Username, string Name, string Password, byte [JsonSerializable(typeof(User))] //////////----------DICTIONARIES----------////////// [JsonSerializable(typeof(Dictionary))] +// [JsonSerializable(typeof(ConcurrentDictionary))] //////////-------------LISTS--------------////////// [JsonSerializable(typeof(List))] [JsonSerializable(typeof(List))]