diff --git a/Endpoint/Configuration/Model/Admin.cs b/Endpoint/Configuration/Model/Admin.cs index 26492ec..381981b 100644 --- a/Endpoint/Configuration/Model/Admin.cs +++ b/Endpoint/Configuration/Model/Admin.cs @@ -10,12 +10,22 @@ namespace Mirea.Api.Endpoint.Configuration.Model; public class Admin : ISaveSettings { [JsonIgnore] private const string FileName = "admin.json"; + private string _username = string.Empty; + private string _email = string.Empty; [JsonIgnore] public static string FilePath => PathBuilder.Combine(FileName); - public required string Username { get; set; } - public required string Email { get; set; } + public required string Username + { + get => _username; + set => _username = value.Trim(); + } + public required string Email + { + get => _email; + set => _email = value.Trim(); + } public required string PasswordHash { get; set; } public required string Salt { get; set; } public TwoFactorAuthenticator TwoFactorAuthenticator { get; set; } = TwoFactorAuthenticator.None;