Example #1
0
        public async Task <IActionResult> FilmSearch(string filmData)

        {
            if (string.IsNullOrWhiteSpace(filmData))
            {
                return(BadRequest("Film ismini giriniz"));
            }

            var result = await _omdbService.FilmSearch(filmData);

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

            return(Ok(new BaseResponseModel
            {
                HttpStatusCode = HttpStatusCode.OK,
                Data = result
            }));
        }