diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-09 16:52:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-09 16:52:57 -0400 |
commit | 0971a10ea41d3e16228ebdf6e48d6667625067a1 (patch) | |
tree | 1f4eb91caff05097dee8fffffcb6a981007ed4c6 /src/SMAPI.Web/Controllers/LogParserController.cs | |
parent | 288ef5dc0715339a3a0bf89975a6db7ab7408e2b (diff) | |
parent | ae7567674d480fbccf25b685d4ddceef01efcdb4 (diff) | |
download | SMAPI-0971a10ea41d3e16228ebdf6e48d6667625067a1.tar.gz SMAPI-0971a10ea41d3e16228ebdf6e48d6667625067a1.tar.bz2 SMAPI-0971a10ea41d3e16228ebdf6e48d6667625067a1.zip |
Merge pull request #838 from KhloeLeclair/clientlog
Improve log parser
Diffstat (limited to 'src/SMAPI.Web/Controllers/LogParserController.cs')
-rw-r--r-- | src/SMAPI.Web/Controllers/LogParserController.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/SMAPI.Web/Controllers/LogParserController.cs b/src/SMAPI.Web/Controllers/LogParserController.cs index 524cfbcc..93f2613e 100644 --- a/src/SMAPI.Web/Controllers/LogParserController.cs +++ b/src/SMAPI.Web/Controllers/LogParserController.cs @@ -1,5 +1,3 @@ -#nullable disable - using System; using System.Linq; using System.Text; @@ -47,7 +45,7 @@ namespace StardewModdingAPI.Web.Controllers [HttpGet] [Route("log")] [Route("log/{id}")] - public async Task<ActionResult> Index(string id = null, LogViewFormat format = LogViewFormat.Default, bool renew = false) + public async Task<ActionResult> Index(string? id = null, LogViewFormat format = LogViewFormat.Default, bool renew = false) { // fresh page if (string.IsNullOrWhiteSpace(id)) @@ -89,7 +87,7 @@ namespace StardewModdingAPI.Web.Controllers public async Task<ActionResult> PostAsync() { // get raw log text - string input = this.Request.Form["input"].FirstOrDefault(); + string? input = this.Request.Form["input"].FirstOrDefault(); if (string.IsNullOrWhiteSpace(input)) return this.View("Index", this.GetModel(null, uploadError: "The log file seems to be empty.")); @@ -111,7 +109,7 @@ namespace StardewModdingAPI.Web.Controllers /// <param name="expiry">When the uploaded file will no longer be available.</param> /// <param name="uploadWarning">A non-blocking warning while uploading the log.</param> /// <param name="uploadError">An error which occurred while uploading the log.</param> - private LogParserModel GetModel(string pasteID, DateTime? expiry = null, string uploadWarning = null, string uploadError = null) + private LogParserModel GetModel(string? pasteID, DateTime? expiry = null, string? uploadWarning = null, string? uploadError = null) { Platform? platform = this.DetectClientPlatform(); |