Refactor email endpoints

This commit is contained in:
nicolas.dorier
2025-02-27 16:50:32 +09:00
committed by rockstardev
parent 78f33f0ca4
commit be8ecb823e
10 changed files with 185 additions and 159 deletions

View File

@@ -1,4 +1,6 @@
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Client.Models;
@@ -7,14 +9,11 @@ public class EmailSettingsData
public string Server { get; set; }
public int? Port { get; set; }
public string Login { get; set; }
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public string Password { get; set; }
public bool? PasswordSet { get; set; }
public string From { get; set; }
public bool DisableCertificateCheck { get; set; }
[JsonIgnore]
public bool EnabledCertificateCheck
{
get => !DisableCertificateCheck;
set { DisableCertificateCheck = !value; }
}
[JsonExtensionData]
public IDictionary<string, JToken> AdditionalData { get; set; } = new Dictionary<string, JToken>();
}