about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web.Server/Pages/Error.cshtml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MatrixRoomUtils.Web.Server/Pages/Error.cshtml.cs')
-rw-r--r--MatrixRoomUtils.Web.Server/Pages/Error.cshtml.cs21
1 files changed, 7 insertions, 14 deletions
diff --git a/MatrixRoomUtils.Web.Server/Pages/Error.cshtml.cs b/MatrixRoomUtils.Web.Server/Pages/Error.cshtml.cs
index b70d895..4b918c1 100644
--- a/MatrixRoomUtils.Web.Server/Pages/Error.cshtml.cs
+++ b/MatrixRoomUtils.Web.Server/Pages/Error.cshtml.cs
@@ -6,21 +6,14 @@ namespace MatrixRoomUtils.Web.Server.Pages;
 
 [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
 [IgnoreAntiforgeryToken]
-public class ErrorModel : PageModel
-{
-    public string? RequestId { get; set; }
+public class ErrorModel : PageModel {
+    private readonly ILogger<ErrorModel> _logger;
 
-    public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
+    public ErrorModel(ILogger<ErrorModel> logger) => _logger = logger;
 
-    private readonly ILogger<ErrorModel> _logger;
+    public string? RequestId { get; set; }
 
-    public ErrorModel(ILogger<ErrorModel> logger)
-    {
-        _logger = logger;
-    }
+    public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
 
-    public void OnGet()
-    {
-        RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
-    }
-}
+    public void OnGet() => RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
+}
\ No newline at end of file