mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 00:46:08 -06:00
Fixed vehicle API not respecting locale invariant format.
This commit is contained in:
parent
baa569b323
commit
c2dd379ea3
@ -120,8 +120,15 @@ namespace CarCareTracker.Controllers
|
||||
{
|
||||
result = _userLogic.FilterUserVehicles(result, GetUserID());
|
||||
}
|
||||
if (_config.GetInvariantApi() || Request.Headers.ContainsKey("culture-invariant"))
|
||||
{
|
||||
return Json(result, StaticHelper.GetInvariantOption());
|
||||
}
|
||||
else
|
||||
{
|
||||
return Json(result);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("/api/vehicle/info")]
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
namespace CarCareTracker.Models
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace CarCareTracker.Models
|
||||
{
|
||||
public class Vehicle
|
||||
{
|
||||
@ -8,7 +10,9 @@
|
||||
public string Make { get; set; }
|
||||
public string Model { get; set; }
|
||||
public string LicensePlate { get; set; }
|
||||
[JsonConverter(typeof(FromDateOptional))]
|
||||
public string PurchaseDate { get; set; }
|
||||
[JsonConverter(typeof(FromDateOptional))]
|
||||
public string SoldDate { get; set; }
|
||||
public decimal PurchasePrice { get; set; }
|
||||
public decimal SoldPrice { get; set; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user