Exemplo n.º 1
0
        public async Task <IActionResult> Alternar(Guid idTarefa)
        {
            try
            {
                var result = await tarefaService.Alternar(idTarefa);

                if (result == false)
                {
                    CreateErrorResponse("Não foi possível alterar", 404);
                }
            }
            catch (Exception ex)
            {
                return(CreateServerErrorResponse(ex, null));
            }

            return(NoContent());
        }