summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Controllers/ModsController.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-10-20 20:19:12 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-10-20 20:19:12 -0400
commitde561e52d7785597f1af2c6fd0d712d19ac5f928 (patch)
tree45d542f4d89f86a87d5828a209b85135e053a3ad /src/SMAPI.Web/Controllers/ModsController.cs
parentb729ef012925ca00f2f9b4c6a2091d6cf78b239c (diff)
downloadSMAPI-de561e52d7785597f1af2c6fd0d712d19ac5f928.tar.gz
SMAPI-de561e52d7785597f1af2c6fd0d712d19ac5f928.tar.bz2
SMAPI-de561e52d7785597f1af2c6fd0d712d19ac5f928.zip
fetch game versions from the wiki (#597)
Diffstat (limited to 'src/SMAPI.Web/Controllers/ModsController.cs')
-rw-r--r--src/SMAPI.Web/Controllers/ModsController.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/SMAPI.Web/Controllers/ModsController.cs b/src/SMAPI.Web/Controllers/ModsController.cs
index f258c745..57aa9da9 100644
--- a/src/SMAPI.Web/Controllers/ModsController.cs
+++ b/src/SMAPI.Web/Controllers/ModsController.cs
@@ -56,11 +56,12 @@ namespace StardewModdingAPI.Web.Controllers
{
return await this.Cache.GetOrCreateAsync($"{nameof(ModsController)}_mod_list", async entry =>
{
- WikiModEntry[] entries = await new ModToolkit().GetWikiCompatibilityListAsync();
+ WikiModList data = await new ModToolkit().GetWikiCompatibilityListAsync();
ModListModel model = new ModListModel(
- stableVersion: "1.3.28",
- betaVersion: "1.3.31-beta",
- mods: entries
+ stableVersion: data.StableVersion,
+ betaVersion: data.BetaVersion,
+ mods: data
+ .Mods
.Select(mod => new ModModel(mod))
.OrderBy(p => Regex.Replace(p.Name.ToLower(), "[^a-z0-9]", "")) // ignore case, spaces, and special characters when sorting
);