diff options
| author | Copilot <198982749+Copilot@users.noreply.github.com> | 2025-11-03 10:51:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-03 10:51:47 +0100 |
| commit | 60f8d79d9e8ccedcd95610a88dd7dc8ec5521aca (patch) | |
| tree | 4fa59e85859ea94a579970fb38ecd32232e2425c /src/Costasdev.Busurbano.Backend | |
| parent | 73b975b7cff87d1e90ad4d0abadc1f65d62ae2e6 (diff) | |
Simplify estimates endpoint to return only arrival data (#57)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: arielcostas <94913521+arielcostas@users.noreply.github.com>
Diffstat (limited to 'src/Costasdev.Busurbano.Backend')
| -rw-r--r-- | src/Costasdev.Busurbano.Backend/SantiagoController.cs | 13 | ||||
| -rw-r--r-- | src/Costasdev.Busurbano.Backend/VigoController.cs | 5 |
2 files changed, 5 insertions, 13 deletions
diff --git a/src/Costasdev.Busurbano.Backend/SantiagoController.cs b/src/Costasdev.Busurbano.Backend/SantiagoController.cs index 51a76c6..41bc62b 100644 --- a/src/Costasdev.Busurbano.Backend/SantiagoController.cs +++ b/src/Costasdev.Busurbano.Backend/SantiagoController.cs @@ -55,17 +55,8 @@ public class SantiagoController : ControllerBase 0 )).ToList(); - return new OkObjectResult(new StopEstimateResponse - { - Stop = new StopEstimateResponse.StopInfo - { - Name = root.GetProperty("nombre").GetString() ?? string.Empty, - Id = root.GetProperty("id").GetInt32(), - Latitude = root.GetProperty("coordenadas").GetProperty("latitud").GetDecimal(), - Longitude = root.GetProperty("coordenadas").GetProperty("longitud").GetDecimal() - }, - Estimates = estimates - }); + // Return only the estimates array, not the stop metadata + return new OkObjectResult(estimates); } catch (InvalidOperationException) { diff --git a/src/Costasdev.Busurbano.Backend/VigoController.cs b/src/Costasdev.Busurbano.Backend/VigoController.cs index 41a8765..be0e7c6 100644 --- a/src/Costasdev.Busurbano.Backend/VigoController.cs +++ b/src/Costasdev.Busurbano.Backend/VigoController.cs @@ -37,8 +37,9 @@ public class VigoController : ControllerBase try { - var estimates = await _api.GetStopEstimates(requestedStopId); - return new OkObjectResult(estimates); + var response = await _api.GetStopEstimates(requestedStopId); + // Return only the estimates array, not the stop metadata + return new OkObjectResult(response.Estimates); } catch (InvalidOperationException) { |
