From 71d85a0c22a9295a08acdf433ef67d8b1b47e57b Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 22 Sep 2017 22:11:04 -0400 Subject: restrict version to a valid SMAPI version (#336) --- src/StardewModdingAPI.Web/Controllers/ModsController.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/StardewModdingAPI.Web/Controllers') diff --git a/src/StardewModdingAPI.Web/Controllers/ModsController.cs b/src/StardewModdingAPI.Web/Controllers/ModsController.cs index 50c23b99..a3f5001a 100644 --- a/src/StardewModdingAPI.Web/Controllers/ModsController.cs +++ b/src/StardewModdingAPI.Web/Controllers/ModsController.cs @@ -12,7 +12,6 @@ using StardewModdingAPI.Web.Models; namespace StardewModdingAPI.Web.Controllers { /// Provides an API to perform mod update checks. - [Route("api/v1.0/mods")] [Produces("application/json")] public class ModsController : Controller { @@ -55,7 +54,7 @@ namespace StardewModdingAPI.Web.Controllers [HttpGet] public async Task> GetAsync(string modKeys) { - return await this.Post(new ModSearchModel + return await this.PostAsync(new ModSearchModel { ModKeys = modKeys?.Split(',').Select(p => p.Trim()).ToArray() ?? new string[0] }); @@ -64,7 +63,7 @@ namespace StardewModdingAPI.Web.Controllers /// Fetch version metadata for the given mods. /// The search options. [HttpPost] - public async Task> Post([FromBody] ModSearchModel search) + public async Task> PostAsync([FromBody] ModSearchModel search) { // sort & filter keys string[] modKeys = (search.ModKeys ?? new string[0]) -- cgit