Esempio n. 1
0
        public async Task <IActionResult> GetMunros([FromQuery] QueryParameters queryParameters)
        {
            try
            {
                if (!queryParameters.MinMaxHeightValid())
                {
                    return(BadRequest("Max height must be greater than min height"));
                }

                var results = await _repository.GetMunrosAsync(queryParameters);

                return(Ok(results));
            }
            catch (Exception)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, "API exception"));
            }
        }