summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Controllers/JsonValidatorController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web/Controllers/JsonValidatorController.cs')
-rw-r--r--src/SMAPI.Web/Controllers/JsonValidatorController.cs6
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