Can clear email settings Fix #150

This commit is contained in:
nicolas.dorier
2018-05-04 02:16:12 +09:00
parent 3ab69046b0
commit 8f1324fdf3
2 changed files with 8 additions and 1 deletions

View File

@@ -255,7 +255,7 @@ namespace BTCPayServer.Controllers
}
return View(model);
}
else
else if(command == "Save")
{
ModelState.Remove(nameof(model.TestEmail));
if (!ModelState.IsValid)
@@ -264,6 +264,12 @@ namespace BTCPayServer.Controllers
model.StatusMessage = "Email settings saved";
return View(model);
}
else
{
await _SettingsRepository.UpdateSetting(new EmailSettings());
model.StatusMessage = "Email settings cleared";
return View(model);
}
}
}
}