Removed redundant intermediate data structure.
This commit is contained in:
parent
77c9eabac1
commit
4afb39f369
|
@ -13,16 +13,6 @@ namespace TrafficLights.Pages
|
|||
public IActionResult OnGet()
|
||||
{
|
||||
var currentStatus = _trafficLightSimulatorService.GetStatus();
|
||||
var data = new
|
||||
{
|
||||
currentPeriodName = currentStatus.CurrentPeriod.Name,
|
||||
currentPeriodVerboseName = currentStatus.CurrentPeriod.VerboseName,
|
||||
currentStateData = currentStatus.CurrentState,
|
||||
currentStateIndex = currentStatus.CurrentStateIndex,
|
||||
secondsUntilChangeover = currentStatus.SecondsUntilChangeover,
|
||||
simulationTime = currentStatus.SimulationTime.ToString()
|
||||
};
|
||||
|
||||
return new JsonResult(currentStatus);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue