Skip to content

Commit

Permalink
CON-1513-fix-apprentice-link
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephek committed Mar 9, 2020
1 parent c0bd863 commit 987c624
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Employer/Employer.Web/Extensions/HtmlHelperExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ public static class HtmlHelperExtensions
public static IHeaderViewModel GetHeaderViewModel(this IHtmlHelper html, bool hideMenu = false)
{
var externalLinks = (html.ViewContext.HttpContext.RequestServices.GetService(typeof(IOptions<ExternalLinksConfiguration>)) as IOptions<ExternalLinksConfiguration>).Value;
var maRoutes = (html.ViewContext.HttpContext.RequestServices.GetService(typeof(IOptions<ManageApprenticeshipsRoutes>)) as IOptions<ManageApprenticeshipsRoutes>).Value;
var authConfig = (html.ViewContext.HttpContext.RequestServices.GetService(typeof(IOptions<AuthenticationConfiguration>)) as IOptions<AuthenticationConfiguration>).Value;
var requestRoot = html.ViewContext.HttpContext.Request.GetRequestUrlRoot();
var requestPath = html.ViewContext.HttpContext.Request.Path;
var commitmentsSiteUrl = new Uri(externalLinks.CommitmentsSiteUrl);

var headerModel = new HeaderViewModel(new HeaderConfiguration
{
EmployerCommitmentsBaseUrl = externalLinks.CommitmentsSiteUrl,
EmployerCommitmentsBaseUrl = $"{commitmentsSiteUrl.Scheme}://{commitmentsSiteUrl.Host}/commitments",
EmployerFinanceBaseUrl = externalLinks.ManageApprenticeshipSiteUrl,
ManageApprenticeshipsBaseUrl = externalLinks.ManageApprenticeshipSiteUrl,
ManageApprenticeshipsBaseUrl = externalLinks.ManageApprenticeshipSiteUrl,
AuthenticationAuthorityUrl = authConfig.Authority,
ClientId = authConfig.ClientId,
EmployerRecruitBaseUrl = requestRoot,
Expand Down

0 comments on commit 987c624

Please sign in to comment.