Initial commit
This commit is contained in:
47
PartSource.Api/Controllers/StoresController.cs
Normal file
47
PartSource.Api/Controllers/StoresController.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
//using Microsoft.AspNetCore.Mvc;
|
||||
//using PartSource.Data.Models;
|
||||
//using PartSource.Services;
|
||||
//using System.Web.Http;
|
||||
|
||||
//namespace PartSource.Api.Controllers
|
||||
//{
|
||||
// [Route("stores")]
|
||||
// public class StoresController : ControllerBase
|
||||
// {
|
||||
// private const int Count = 5;
|
||||
// private const int Page = 1;
|
||||
// private readonly LocationService _service;
|
||||
|
||||
// public StoresController(LocationService service)
|
||||
// {
|
||||
// this._service = service;
|
||||
// }
|
||||
|
||||
// [HttpGet]
|
||||
// [Route("nearest/{postal}")]
|
||||
// [Route("nearest/{postal}/count/{count}")]
|
||||
// [Route("nearest/{postal}/count/{count}/page/{page}")]
|
||||
// public ActionResult GetNearestStores(string postal, int count = 5, int page = 1)
|
||||
// {
|
||||
// PostalCode postalCodeData = this._service.GetPostalCodeData(postal);
|
||||
// if (postalCodeData == null)
|
||||
// return (ActionResult)this.BadRequest("Invalid postal code");
|
||||
// return (ActionResult)this.Ok(new
|
||||
// {
|
||||
// Data = this._service.GetClosestLocations(postalCodeData, count, page)
|
||||
// });
|
||||
// }
|
||||
|
||||
// [HttpGet]
|
||||
// [Route("nearest/{postal}/radius/{radius}")]
|
||||
// [Route("nearest/{postal}/radius/{radius}/count/{count}")]
|
||||
// [Route("nearest/{postal}/radius/{radius}/count/{count}/page/{page}")]
|
||||
// public ActionResult GetNearestStores(string postal, double radius, int count = 5, int page = 1)
|
||||
// {
|
||||
// return (ActionResult)this.Ok(new
|
||||
// {
|
||||
// Data = this._service.GetClosestLocations(this._service.GetPostalCodeData(postal), count, page, radius)
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
Reference in New Issue
Block a user