WebServer controller changes along with JSON settings

This commit is contained in:
2025-04-07 15:41:19 -04:00
parent f39d50af89
commit a7627e3f22
8 changed files with 40 additions and 96 deletions

View File

@@ -18,8 +18,8 @@ namespace MarketDataServer.Controllers
{
private ActiveGainLossGenerator gainLossGenerator=new ActiveGainLossGenerator();
[HttpGet(Name = "GetGainLoss")]
public IEnumerable<GainLossSummaryItem> GetGainLoss(String token, DateTime selectedDate)
[HttpGet]
public IEnumerable<GainLossSummaryItem> GetGainLossByDate(String token,DateTime selectedDate)
{
MDTrace.WriteLine(LogLevel.DEBUG,String.Format("[{0:G}][GainLossController::GetGainLoss](String token, DateTime selectedDate)", DateTime.Now));
if (!Authorizations.GetInstance().IsAuthorized(token)) return null;
@@ -53,8 +53,8 @@ namespace MarketDataServer.Controllers
return gainLossSummaryItems;
}
[HttpGet(Name = "GetGainLoss")]
public IEnumerable<GainLossSummaryItem> GetGainLoss(String token, DateTime selectedDate,String account)
[HttpGet]
public IEnumerable<GainLossSummaryItem> GetGainLossByDateAndAccount(String token,DateTime selectedDate,String account)
{
MDTrace.WriteLine(LogLevel.DEBUG,String.Format("[{0:G}][GainLossController::GetGainLoss](String token, DateTime selectedDate,String account)", DateTime.Now));
LocalPriceCache.GetInstance().Refresh();
@@ -89,8 +89,8 @@ namespace MarketDataServer.Controllers
return gainLossSummaryItems;
}
[HttpGet(Name = "GetGainLossWithDetail")]
public IEnumerable<GainLossSummaryItemDetail> GetGainLossWithDetail(String token, DateTime selectedDate)
[HttpGet]
public IEnumerable<GainLossSummaryItemDetail> GetGainLossWithDetailByDate(String token,DateTime selectedDate)
{
MDTrace.WriteLine(LogLevel.DEBUG,String.Format("[{0:G}][GainLossController::GetGainLossWithDetail](String token, DateTime selectedDate)", DateTime.Now));
if (!Authorizations.GetInstance().IsAuthorized(token)) return null;
@@ -175,8 +175,8 @@ namespace MarketDataServer.Controllers
return gainLossSummaryItemDetailCollection;
}
[HttpGet(Name = "GetGainLossWithDetail")]
public IEnumerable<GainLossSummaryItemDetail> GetGainLossWithDetail(String token, DateTime selectedDate, String account)
[HttpGet]
public IEnumerable<GainLossSummaryItemDetail> GetGainLossWithDetailByDateAndAccount(String token, DateTime selectedDate, String account)
{
MDTrace.WriteLine(LogLevel.DEBUG,String.Format("[{0:G}][GainLossController::GetGainLossWithDetail](String token, DateTime selectedDate,String account)", DateTime.Now));
if (!Authorizations.GetInstance().IsAuthorized(token)) return null;