Exemplo n.º 1
0
        public async Task <IActionResult> GetReposByCityAsync(string city)
        {
            _logger.LogInformation($"Search repos by city {city}");
            var data = await _dataRetriever.GetRepositoriesByCity(city);

            if (!string.IsNullOrEmpty(data.Error))
            {
                return(StatusCode(500, data.Error));
            }

            return(Ok(data));
        }