Exemple #1
0
        public ActionResult <string> GetFilmesPorPalavraChave(string palavraChave)
        {
            try
            {
                var filmes = _filmeRepository.GetAllFilmesPalavraChave(palavraChave);

                if (filmes != null)
                {
                    return(Ok(filmes));
                }
                else
                {
                    return(NotFound("Filme não encontrado"));
                }
            }
            catch (Exception)
            {
                return(StatusCode(500));
            }
        }