summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Controllers/ModsApiController.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-12-01 21:55:20 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-12-02 20:14:07 -0500
commit5f532c259d5d3050bd6a053659067617db136d57 (patch)
tree06b8bf7ac63ccab8be27908002612a53d5975075 /src/SMAPI.Web/Controllers/ModsApiController.cs
parent8766a79408ce79bd632c1fe1c9b17ab0a7a6a976 (diff)
downloadSMAPI-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/Controllers/ModsApiController.cs')
-rw-r--r--src/SMAPI.Web/Controllers/ModsApiController.cs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/SMAPI.Web/Controllers/ModsApiController.cs b/src/SMAPI.Web/Controllers/ModsApiController.cs
index fe220eb5..f10e0067 100644
--- a/src/SMAPI.Web/Controllers/ModsApiController.cs
+++ b/src/SMAPI.Web/Controllers/ModsApiController.cs
@@ -49,9 +49,6 @@ namespace StardewModdingAPI.Web.Controllers
/// <summary>The internal mod metadata list.</summary>
private readonly ModDatabase ModDatabase;
- /// <summary>The web URL for the compatibility list.</summary>
- private readonly string CompatibilityPageUrl;
-
/*********
** Public methods
@@ -70,7 +67,6 @@ namespace StardewModdingAPI.Web.Controllers
{
this.ModDatabase = new ModToolkit().GetModDatabase(Path.Combine(environment.WebRootPath, "SMAPI.metadata.json"));
ModUpdateCheckConfig config = configProvider.Value;
- this.CompatibilityPageUrl = config.CompatibilityPageUrl;
this.WikiCache = wikiCache;
this.ModCache = modCache;
@@ -205,7 +201,7 @@ namespace StardewModdingAPI.Web.Controllers
// get unofficial version
if (wikiEntry?.Compatibility.UnofficialVersion != null && this.IsNewer(wikiEntry.Compatibility.UnofficialVersion, main?.Version) && this.IsNewer(wikiEntry.Compatibility.UnofficialVersion, optional?.Version))
- unofficial = new ModEntryVersionModel(wikiEntry.Compatibility.UnofficialVersion, $"{this.CompatibilityPageUrl}/#{wikiEntry.Anchor}");
+ unofficial = new ModEntryVersionModel(wikiEntry.Compatibility.UnofficialVersion, $"{this.Url.Action("Index", "Mods")}#{wikiEntry.Anchor}");
// get unofficial version for beta
if (wikiEntry?.HasBetaInfo == true)
@@ -215,7 +211,7 @@ namespace StardewModdingAPI.Web.Controllers
if (wikiEntry.BetaCompatibility.UnofficialVersion != null)
{
unofficialForBeta = (wikiEntry.BetaCompatibility.UnofficialVersion != null && this.IsNewer(wikiEntry.BetaCompatibility.UnofficialVersion, main?.Version) && this.IsNewer(wikiEntry.BetaCompatibility.UnofficialVersion, optional?.Version))
- ? new ModEntryVersionModel(wikiEntry.BetaCompatibility.UnofficialVersion, $"{this.CompatibilityPageUrl}/#{wikiEntry.Anchor}")
+ ? new ModEntryVersionModel(wikiEntry.BetaCompatibility.UnofficialVersion, $"{this.Url.Action("Index", "Mods")}#{wikiEntry.Anchor}")
: null;
}
else