Ejemplo n.º 1
0
        public async Task <IActionResult> DeleteAsync(int id)
        {
            var result = await categoriaService.DeleteAsync(id);

            if (result.code == Code.ITEM_NOT_DELETED)
            {
                return(BadRequest(new { result.code, message = "Não foi possível deletar a categoria." }));
            }

            return(Ok("Categoria deletada com sucesso."));
        }
Ejemplo n.º 2
0
 public async Task ConfirmDelete(string id)
 {
     await _categoriaService.DeleteAsync("categorias/" + id);
 }