public async Task <IActionResult> GetTrendingReposByLanguage(string language) { if (string.IsNullOrWhiteSpace(language)) { return(BadRequest("Wrong param given")); } var repositories = await _githubService.GetReposByLanguage(language); if (repositories == null) { return(BadRequest()); } return(Ok(repositories)); }