public IActionResult Valid([FromBody] Dictionary <string, string> assuntoChamadoDictionary) { AssuntoChamado assuntoChamado = _assuntoChamadoService.Valid(assuntoChamadoDictionary); if (assuntoChamado == null) { return(NotFound(_assuntoChamadoService.GetMessage())); } return(Ok(assuntoChamado)); }
public IActionResult Update([FromBody] AssuntoChamado assuntoChamado) { bool update = _assuntoChamadoService.Update(assuntoChamado); if (!update) { return(NotFound()); } return(NoContent()); }
public IActionResult Add([FromBody] AssuntoChamado assuntoChamado) { assuntoChamado = _assuntoChamadoService.Add(assuntoChamado); if (assuntoChamado == null) { return(NotFound()); } return(Ok(assuntoChamado)); }
public IActionResult GetById([FromRoute] int id) { AssuntoChamado assuntoChamado = _assuntoChamadoService.GetById(id); if (assuntoChamado == null) { return(NotFound()); } return(Ok(assuntoChamado)); }
public IActionResult Remove([FromRoute] int id) { AssuntoChamado assuntoChamado = _assuntoChamadoService.GetById(id); if (assuntoChamado == null) { return(NotFound()); } bool remove = _assuntoChamadoService.Remove(assuntoChamado); if (!remove) { return(NotFound()); } return(NoContent()); }