public async Task <IActionResult> Cadastro([FromBody] CadastroFielViewModel cadastroFielViewModel) { await _fielAppService.CadastroFiel(cadastroFielViewModel); if (_domainNotificationHandler.TemNotificacao()) { var erros = _domainNotificationHandler.ListaErros(); _domainNotificationHandler.LimparNotification(); return(BadRequest(erros)); } return(CreatedAtAction(nameof(Cadastro), new { Login = cadastroFielViewModel.Login })); }
public async Task <IActionResult> CadastroProprietario([FromBody] CadastroProprietarioViewModel cadastroProprietarioViewModel) { await _proprietarioAppService.CadastroUsuario(cadastroProprietarioViewModel); if (_domainNotificationHandler.TemNotificacao()) { var erros = _domainNotificationHandler.ListaErros(); _domainNotificationHandler.LimparNotification(); return(BadRequest(erros)); } return(NoContent()); }