Exemplo n.º 1
0
        public IActionResult Valid([FromBody] Dictionary <string, string> assuntoChamadoDictionary)
        {
            AssuntoChamado assuntoChamado = _assuntoChamadoService.Valid(assuntoChamadoDictionary);

            if (assuntoChamado == null)
            {
                return(NotFound(_assuntoChamadoService.GetMessage()));
            }

            return(Ok(assuntoChamado));
        }
Exemplo n.º 2
0
        public IActionResult Update([FromBody] AssuntoChamado assuntoChamado)
        {
            bool update = _assuntoChamadoService.Update(assuntoChamado);

            if (!update)
            {
                return(NotFound());
            }

            return(NoContent());
        }
Exemplo n.º 3
0
        public IActionResult Add([FromBody] AssuntoChamado assuntoChamado)
        {
            assuntoChamado = _assuntoChamadoService.Add(assuntoChamado);

            if (assuntoChamado == null)
            {
                return(NotFound());
            }

            return(Ok(assuntoChamado));
        }
Exemplo n.º 4
0
        public IActionResult GetById([FromRoute] int id)
        {
            AssuntoChamado assuntoChamado = _assuntoChamadoService.GetById(id);

            if (assuntoChamado == null)
            {
                return(NotFound());
            }

            return(Ok(assuntoChamado));
        }
Exemplo n.º 5
0
        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());
        }