Unify the strurcture
This commit is contained in:
@@ -9,14 +9,13 @@ namespace AS1024.CommunityDocumentationPage.Controllers
|
|||||||
{
|
{
|
||||||
private readonly ILogger<HomeController> _logger;
|
private readonly ILogger<HomeController> _logger;
|
||||||
private readonly IBgpCommunityDocumentation _documentation;
|
private readonly IBgpCommunityDocumentation _documentation;
|
||||||
|
private readonly IConfiguration _configuration;
|
||||||
private IConfiguration Configuration { get; }
|
|
||||||
|
|
||||||
public HomeController(ILogger<HomeController> logger,
|
public HomeController(ILogger<HomeController> logger,
|
||||||
IConfiguration configuration, IBgpCommunityDocumentation documentation)
|
IConfiguration configuration, IBgpCommunityDocumentation documentation)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
Configuration = configuration;
|
_configuration = configuration;
|
||||||
_documentation = documentation;
|
_documentation = documentation;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,7 +25,7 @@ namespace AS1024.CommunityDocumentationPage.Controllers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var results = await _documentation.GetBgpCommunities();
|
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();
|
.ToList();
|
||||||
|
|
||||||
return View(filtered);
|
return View(filtered);
|
||||||
|
|||||||
Reference in New Issue
Block a user