mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Reverting changes, validate email only if it was provided
This commit is contained in:
@@ -70,11 +70,11 @@ namespace BTCPayServer.Controllers.GreenField
|
||||
[HttpPut("~/api/v1/stores/{storeId}/email")]
|
||||
public async Task<IActionResult> UpdateStoreEmailSettings(string storeId, EmailSettingsData request)
|
||||
{
|
||||
if (!MailboxAddressValidator.IsMailboxAddress(request.From))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(request.From) && !MailboxAddressValidator.IsMailboxAddress(request.From))
|
||||
ModelState.AddModelError(nameof(request.From), "Invalid email address");
|
||||
|
||||
if (!ModelState.IsValid)
|
||||
return this.CreateValidationError(ModelState);
|
||||
}
|
||||
|
||||
var store = HttpContext.GetStoreData();
|
||||
var blob = store.GetStoreBlob();
|
||||
|
||||
Reference in New Issue
Block a user