diff --git a/src/StardewModdingAPI.Web/Controllers/ModsController.cs b/src/StardewModdingAPI.Web/Controllers/ModsController.cs index 79c31c3f..06a80638 100644 --- a/src/StardewModdingAPI.Web/Controllers/ModsController.cs +++ b/src/StardewModdingAPI.Web/Controllers/ModsController.cs @@ -67,27 +67,16 @@ namespace StardewModdingAPI.Web.Controllers /// The namespaced mod keys to search as a comma-delimited array. [HttpGet] public async Task> GetAsync(string modKeys) - { - return await this.PostAsync(new ModSearchModel - { - ModKeys = modKeys?.Split(',').Select(p => p.Trim()).ToArray() ?? new string[0] - }); - } - - /// Fetch version metadata for the given mods. - /// The search options. - [HttpPost] - public async Task> PostAsync([FromBody] ModSearchModel search) { // sort & filter keys - string[] modKeys = (search.ModKeys ?? new string[0]) + string[] modKeysArray = (modKeys?.Split(',').Select(p => p.Trim()).ToArray() ?? new string[0]) .Distinct(StringComparer.CurrentCultureIgnoreCase) .OrderBy(p => p, StringComparer.CurrentCultureIgnoreCase) .ToArray(); // fetch mod info IDictionary result = new Dictionary(StringComparer.CurrentCultureIgnoreCase); - foreach (string modKey in modKeys) + foreach (string modKey in modKeysArray) { // parse mod key if (!this.TryParseModKey(modKey, out string vendorKey, out string modID)) diff --git a/src/StardewModdingAPI.Web/Models/ModSearchModel.cs b/src/StardewModdingAPI.Web/Models/ModSearchModel.cs deleted file mode 100644 index b9a73af6..00000000 --- a/src/StardewModdingAPI.Web/Models/ModSearchModel.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace StardewModdingAPI.Web.Models -{ - /// Metadata for mods to look up. - internal class ModSearchModel - { - /// The namespaced mod keys to search. - public string[] ModKeys { get; set; } - } -}