Exemplo n.º 1
0
        public async Task <IActionResult> CreateAsync([FromBody] AccountDto accountToCreate)
        {
            try
            {
                await this.createAccountUseCase.CreateAsync(accountToCreate.ToDomain());

                return(Ok());
            }
            catch (InvalidOperationException)
            {
                return(BadRequest());
            }
            catch (Exception e)
            {
                return(ValidationProblem(e.Message));
            }
        }