Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
damienbod committed Jul 27, 2023
1 parent 8c29372 commit f086ff1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
2 changes: 2 additions & 0 deletions VerifierInsuranceCompany/Pages/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
var nonce = this.HttpContext.GetNonce();
}

<h1>Owners @Model.Owners</h1>

<div class="container">
<div class="row">
<div class="col-sm">
Expand Down
22 changes: 21 additions & 1 deletion VerifierInsuranceCompany/Pages/Index.cshtml.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
using System.ComponentModel;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace VerifierInsuranceCompany.Pages;

public class IndexModel : PageModel
{
private IConfiguration _configuration;

[BindProperty]
public string Owners { get; set; } = string.Empty;

public IndexModel(IConfiguration configuration )
{
_configuration = configuration;
}

public void OnGet()
{
ResolveAdditionalOwners();
}

private void ResolveAdditionalOwners()
{
var additionalOwners = _configuration.GetSection("AdditionalOwners").Get<string[]>();

Owners = $"Count: {additionalOwners!.Length} additionalOwners first: {additionalOwners!.FirstOrDefault()}";
}
}
3 changes: 2 additions & 1 deletion VerifierInsuranceCompany/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
"AllowedHosts": "*",
"AdditionalOwners": [ "[email protected]" ]

// Add the secret settings to you user secrets for development
// Add the secret settings to you user secrets for development
Expand Down

0 comments on commit f086ff1

Please sign in to comment.