diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-17 01:07:18 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-17 01:07:18 -0400 |
commit | b25e30a896cd7ed65d02db7d8639cd28a11981f0 (patch) | |
tree | 8f8aecd4049df5474062304b6081b6211381537f /src/SMAPI.Web/Controllers | |
parent | 7b79703de69f044a03884be83d6df3790d8f8ee9 (diff) | |
download | SMAPI-b25e30a896cd7ed65d02db7d8639cd28a11981f0.tar.gz SMAPI-b25e30a896cd7ed65d02db7d8639cd28a11981f0.tar.bz2 SMAPI-b25e30a896cd7ed65d02db7d8639cd28a11981f0.zip |
fix model binding error
Diffstat (limited to 'src/SMAPI.Web/Controllers')
-rw-r--r-- | src/SMAPI.Web/Controllers/JsonValidatorController.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SMAPI.Web/Controllers/JsonValidatorController.cs b/src/SMAPI.Web/Controllers/JsonValidatorController.cs index e78aeeb6..c551a805 100644 --- a/src/SMAPI.Web/Controllers/JsonValidatorController.cs +++ b/src/SMAPI.Web/Controllers/JsonValidatorController.cs @@ -122,7 +122,7 @@ namespace StardewModdingAPI.Web.Controllers FileInfo? schemaFile = this.FindSchemaFile(schemaName); if (schemaFile == null) return this.View("Index", result.SetParseError($"Invalid schema '{schemaName}'.")); - schema = JSchema.Parse(System.IO.File.ReadAllText(schemaFile.FullName)); + schema = JSchema.Parse(await System.IO.File.ReadAllTextAsync(schemaFile.FullName)); } // get format doc URL @@ -151,7 +151,7 @@ namespace StardewModdingAPI.Web.Controllers string schemaName = this.NormalizeSchemaName(request.SchemaName); // get raw text - string input = request.Content; + string? input = request.Content; if (string.IsNullOrWhiteSpace(input)) return this.View("Index", this.GetModel(null, schemaName, isEditView: true).SetUploadError("The JSON file seems to be empty.")); |