Skip to content

Commit

Permalink
#37 - Simplified error page.
Browse files Browse the repository at this point in the history
  • Loading branch information
maraf committed Feb 19, 2019
1 parent 0ef075a commit baee4f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/FileUpload.Web.UI/Controllers/MainController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ private string GetAppVersion()
=> "v" + typeof(UploadOptions).Assembly.GetName().Version.ToString(3);

[Route("")]
public IActionResult Index()
{
return base.View(new IndexViewModel(GetAppVersion(), factory.CreateUpload(), factory.CreateBrowser()));
}
public IActionResult Index() => View(new IndexViewModel(GetAppVersion(), factory.CreateUpload(), factory.CreateBrowser()));

[Route("browse")]
[HttpGet]
Expand Down
4 changes: 3 additions & 1 deletion src/FileUpload.Web.UI/Views/Shared/Error.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@{
ViewData["Title"] = "Error";
Layout = null;
}

<h1 class="text-danger">Error.</h1>
<h1 class="text-danger">Error</h1>
<p>Some unhandled error has occurred. Details have been logged.</p>

0 comments on commit baee4f3

Please sign in to comment.