Unify the strurcture
This commit is contained in:
parent
77e6235b30
commit
bd8198be2a
|
|
@ -9,14 +9,13 @@ namespace AS1024.CommunityDocumentationPage.Controllers
|
|||
{
|
||||
private readonly ILogger<HomeController> _logger;
|
||||
private readonly IBgpCommunityDocumentation _documentation;
|
||||
|
||||
private IConfiguration Configuration { get; }
|
||||
private readonly IConfiguration _configuration;
|
||||
|
||||
public HomeController(ILogger<HomeController> logger,
|
||||
IConfiguration configuration, IBgpCommunityDocumentation documentation)
|
||||
{
|
||||
_logger = logger;
|
||||
Configuration = configuration;
|
||||
_configuration = configuration;
|
||||
_documentation = documentation;
|
||||
}
|
||||
|
||||
|
|
@ -26,7 +25,7 @@ namespace AS1024.CommunityDocumentationPage.Controllers
|
|||
try
|
||||
{
|
||||
var results = await _documentation.GetBgpCommunities();
|
||||
var filtered = results.Results.Where(b => b.Name.StartsWith(Configuration["ASN"]))
|
||||
var filtered = results.Results.Where(b => b.Name.StartsWith(_configuration["ASN"]))
|
||||
.ToList();
|
||||
|
||||
return View(filtered);
|
||||
|
|
|
|||
Loading…
Reference in New Issue