summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI.Web/Controllers
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-09-22 22:11:04 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-09-22 22:11:04 -0400
commit71d85a0c22a9295a08acdf433ef67d8b1b47e57b (patch)
tree18cf4d7fff451dbe2ebb83a9a5d5f5c3f16f2380 /src/StardewModdingAPI.Web/Controllers
parentecdbefffd9c0acbbecd8178d7d2ac285715b5e7f (diff)
downloadSMAPI-71d85a0c22a9295a08acdf433ef67d8b1b47e57b.tar.gz
SMAPI-71d85a0c22a9295a08acdf433ef67d8b1b47e57b.tar.bz2
SMAPI-71d85a0c22a9295a08acdf433ef67d8b1b47e57b.zip
restrict version to a valid SMAPI version (#336)
Diffstat (limited to 'src/StardewModdingAPI.Web/Controllers')
-rw-r--r--src/StardewModdingAPI.Web/Controllers/ModsController.cs5
1 files changed, 2 insertions, 3 deletions
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
{
/// <summary>Provides an API to perform mod update checks.</summary>
- [Route("api/v1.0/mods")]
[Produces("application/json")]
public class ModsController : Controller
{
@@ -55,7 +54,7 @@ namespace StardewModdingAPI.Web.Controllers
[HttpGet]
public async Task<IDictionary<string, ModInfoModel>> 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
/// <summary>Fetch version metadata for the given mods.</summary>
/// <param name="search">The search options.</param>
[HttpPost]
- public async Task<IDictionary<string, ModInfoModel>> Post([FromBody] ModSearchModel search)
+ public async Task<IDictionary<string, ModInfoModel>> PostAsync([FromBody] ModSearchModel search)
{
// sort & filter keys
string[] modKeys = (search.ModKeys ?? new string[0])