1
0

Fixed Resume page for missing resume data

This commit is contained in:
Michael Gordeev
2020-04-04 21:38:26 +03:00
parent a1edca63e7
commit 2e801f2e88
2 changed files with 4 additions and 2 deletions
@@ -13,6 +13,8 @@ namespace MyWebsite.Controllers
public IActionResult Index()
{
ResumeViewModel model = new ResumeViewModel(Database, CultureInfo.CurrentUICulture);
if (model.Resume == null)
return NotFound();
model.Resume.Content = model.Resume.Content
.Replace("%WEBSITE%", $"{Request.Scheme}://{Request.Host}/", true, CultureInfo.InvariantCulture)
.Replace("%PHONE_NUMBER%", "+7 (996) 929-19-69", true, CultureInfo.InvariantCulture)
@@ -5,14 +5,14 @@
<header>
<h1>My resume</h1>
<p>Last update: @Model?.Resume?.LastUpdate</p>
<p>Last update: @Model.Resume.LastUpdate</p>
<a class="comment" asp-action="Download">// Download CV (.pdf) &#xE118;</a><br />
<a class="comment" asp-action="Print">// Print CV &#xE749;</a>
</header>
<article>
@Html.Raw(Model?.Resume?.Content)
@Html.Raw(Model.Resume.Content)
</article>
@section Footer