diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-12-01 21:55:20 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-12-02 20:14:07 -0500 |
commit | 5f532c259d5d3050bd6a053659067617db136d57 (patch) | |
tree | 06b8bf7ac63ccab8be27908002612a53d5975075 /src/SMAPI.Web/Views/JsonValidator/Index.cshtml | |
parent | 8766a79408ce79bd632c1fe1c9b17ab0a7a6a976 (diff) | |
download | SMAPI-5f532c259d5d3050bd6a053659067617db136d57.tar.gz SMAPI-5f532c259d5d3050bd6a053659067617db136d57.tar.bz2 SMAPI-5f532c259d5d3050bd6a053659067617db136d57.zip |
migrate from AWS to Azure
This commit migrates from subdomains to paths (due to the cost of a wildcard HTTPS certificate on Azure), adds a web project to redirect the old subdomains from AWS to Azure, and removes AWS-specific hacks.
Diffstat (limited to 'src/SMAPI.Web/Views/JsonValidator/Index.cshtml')
-rw-r--r-- | src/SMAPI.Web/Views/JsonValidator/Index.cshtml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/SMAPI.Web/Views/JsonValidator/Index.cshtml b/src/SMAPI.Web/Views/JsonValidator/Index.cshtml index 3143fad9..41dec929 100644 --- a/src/SMAPI.Web/Views/JsonValidator/Index.cshtml +++ b/src/SMAPI.Web/Views/JsonValidator/Index.cshtml @@ -3,8 +3,8 @@ @{ // get view data - string curPageUrl = new Uri(new Uri(Model.SectionUrl), $"{Model.SchemaName}/{Model.PasteID}").ToString(); - string newUploadUrl = Model.SchemaName != null ? new Uri(new Uri(Model.SectionUrl), Model.SchemaName).ToString() : Model.SectionUrl; + string curPageUrl = this.Url.Action("Index", "JsonValidator", new { schemaName = Model.SchemaName, id = Model.PasteID }); + string newUploadUrl = this.Url.Action("Index", "JsonValidator", new { schemaName = Model.SchemaName }); string schemaDisplayName = null; bool isValidSchema = Model.SchemaName != null && Model.SchemaFormats.TryGetValue(Model.SchemaName, out schemaDisplayName) && schemaDisplayName != "None"; @@ -34,8 +34,8 @@ <script src="https://cdn.jsdelivr.net/gh/tmont/sunlight@1.22.0/src/lang/sunlight.javascript.min.js" crossorigin="anonymous"></script> <script src="~/Content/js/json-validator.js"></script> <script> - $(function () { - smapi.jsonValidator(@Json.Serialize(Model.SectionUrl), @Json.Serialize(Model.PasteID)); + $(function() { + smapi.jsonValidator(@Json.Serialize(this.Url.Action("Index", "JsonValidator")), @Json.Serialize(Model.PasteID)); }); </script> } @@ -70,7 +70,7 @@ else if (Model.PasteID != null) @if (Model.Content == null) { <h2>Upload a JSON file</h2> - <form action="@Model.SectionUrl" method="post"> + <form action="@this.Url.Action("PostAsync", "JsonValidator")" method="post"> <ol> <li> Choose the JSON format:<br /> |