diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-12-16 21:39:37 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-12-16 21:39:37 -0500 |
commit | c4e2e94eed30f6e04312d5973322e4696ea672ea (patch) | |
tree | 9047dfff7e1273aea8cf6116a5c0a67090183083 /src/SMAPI.Web/Controllers | |
parent | f692af269c46b05b06e717c98121ade34a374cb9 (diff) | |
download | SMAPI-c4e2e94eed30f6e04312d5973322e4696ea672ea.tar.gz SMAPI-c4e2e94eed30f6e04312d5973322e4696ea672ea.tar.bz2 SMAPI-c4e2e94eed30f6e04312d5973322e4696ea672ea.zip |
add option to edit & reupload in the JSON validator
Diffstat (limited to 'src/SMAPI.Web/Controllers')
-rw-r--r-- | src/SMAPI.Web/Controllers/JsonValidatorController.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/SMAPI.Web/Controllers/JsonValidatorController.cs b/src/SMAPI.Web/Controllers/JsonValidatorController.cs index 830fe839..e4eff0f4 100644 --- a/src/SMAPI.Web/Controllers/JsonValidatorController.cs +++ b/src/SMAPI.Web/Controllers/JsonValidatorController.cs @@ -55,7 +55,7 @@ namespace StardewModdingAPI.Web.Controllers ** Web UI ***/ /// <summary>Render the schema validator UI.</summary> - /// <param name="schemaName">The schema name with which to validate the JSON.</param> + /// <param name="schemaName">The schema name with which to validate the JSON, or 'edit' to return to the edit screen.</param> /// <param name="id">The stored file ID.</param> [HttpGet] [Route("json")] @@ -75,6 +75,10 @@ namespace StardewModdingAPI.Web.Controllers return this.View("Index", result.SetUploadError("The JSON file seems to be empty.")); result.SetContent(file.Content, expiry: file.Expiry, uploadWarning: file.Warning); + // skip parsing if we're going to the edit screen + if (schemaName?.ToLower() == "edit") + return this.View("Index", result); + // parse JSON JToken parsed; try |