Updated Controller structuring.

This commit is contained in:
2021-07-24 02:32:30 -05:00
parent 2c90678141
commit 4476b1b3e1
3 changed files with 16 additions and 8 deletions

View File

@@ -0,0 +1,11 @@
using Microsoft.AspNetCore.Mvc;
namespace Props.Controllers
{
[ApiController]
[Route("api/[Controller]")]
public class ApiControllerBase : ControllerBase
{
}
}

View File

@@ -4,9 +4,7 @@ using Props.Services.Modules;
namespace Props.Controllers
{
[ApiController]
[Route("api/[Controller]")]
public class SearchController : ControllerBase
public class SearchController : ApiControllerBase
{
private SearchOutline defaultOutline = new SearchOutline();
IShopManager shopManager;
@@ -23,16 +21,15 @@ namespace Props.Controllers
return Ok(shopManager.AvailableShops());
}
[HttpGet]
[Route("Default/Outline/Filters")]
[Route("Default/Filters")]
public IActionResult GetDefaultFilters()
{
return Ok(defaultOutline.Filters);
}
[HttpGet]
[Route("Default/Outline/DisabledShops")]
[Route("Default/DisabledShops")]
public IActionResult GetDefaultDisabledShops()
{
return Ok(defaultOutline.Disabled);