public async Task <IActionResult> EditSmtpAccount([FromBody] Models.SmtpAccount account) { if (await _dataAccess.GetSmtpAccount() == null) { return(StatusCode(409)); } await _dataAccess.EditSmtpAccount(Convert(account)); return(StatusCode(201)); }
private SmtpAccount Convert(Models.SmtpAccount source) { return(new SmtpAccount { Id = source.Id, EnableSSl = source.EnableSSl, FromAddress = source.FromAddress, Password = source.Password, Port = source.Port, Server = source.Server, UserName = source.UserName }); }