This commit is contained in:
2020-07-26 22:05:42 -04:00
parent f2ca3419b0
commit 85d99d2615
4 changed files with 10 additions and 5 deletions

View File

@@ -12,8 +12,10 @@ namespace PartSource.Api.Controllers
[Route("[controller]")]
public class ErrorController : ControllerBase
{
[HttpGet]
[Route("")]
[AllowAnonymous]
public ActionResult Get()
{
IExceptionHandlerPathFeature exceptionFeature = HttpContext.Features.Get<IExceptionHandlerPathFeature>();

View File

@@ -7,6 +7,7 @@ using System.Threading.Tasks;
namespace PartSource.Api.Controllers
{
[Route("[controller]")]
[Route("v1/[controller]")]
[ApiController]
public class InventoryController : BaseNexpartController
{
@@ -21,7 +22,7 @@ namespace PartSource.Api.Controllers
[Route("sku/{sku}/storeNumber/{storeNumber}")]
public async Task<ActionResult> GetInventory(int sku, int storeNumber)
{
PartsAvailability inventory = _inventoryService.GetInventory(sku, storeNumber);
PartsAvailability inventory = await _inventoryService.GetInventory(sku, storeNumber);
if (inventory == null)
{

View File

@@ -17,8 +17,8 @@ namespace PartSource.Api.Controllers
/// <summary>
/// This controller exists to enable legacy support for the old Nexpart-based vehicle lookup.
/// </summary>
[Obsolete]
[Route("vehicles")]
[Route("v1/vehicles")]
[ApiController]
public class LegacyVehiclesController : BaseNexpartController
{