Example #1
0
        public IActionResult Get(string source, string target)
        {
            var distance = _airportService.GetByIATA(source, target);

            if (distance > 0)
            {
                return(Ok(distance));
            }
            return(NotFound("You have entered an invalid IATA code. Please check and revise accordingly."));
        }