diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2026-02-14 01:35:54 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2026-02-14 01:36:09 +0100 |
| commit | ac366d04cd54869c9a2b090aae24a276c32a85a6 (patch) | |
| tree | 64a5c5903b07646a5c58b1b7e4c9704022549245 /src/Enmarcha.Backend/Controllers | |
| parent | 3f8fb6fda07f97c9fd676cff67c637c0df0f7029 (diff) | |
feat: Implemen experimental bus stop usage display
Diffstat (limited to 'src/Enmarcha.Backend/Controllers')
| -rw-r--r-- | src/Enmarcha.Backend/Controllers/ArrivalsController.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Enmarcha.Backend/Controllers/ArrivalsController.cs b/src/Enmarcha.Backend/Controllers/ArrivalsController.cs index 13fb430..a887c89 100644 --- a/src/Enmarcha.Backend/Controllers/ArrivalsController.cs +++ b/src/Enmarcha.Backend/Controllers/ArrivalsController.cs @@ -130,7 +130,7 @@ public partial class ArrivalsController : ControllerBase arrivals.Add(arrival); } - await _pipeline.ExecuteAsync(new ArrivalsContext + var context = new ArrivalsContext { StopId = id, StopCode = stop.Code, @@ -138,7 +138,9 @@ public partial class ArrivalsController : ControllerBase Arrivals = arrivals, NowLocal = nowLocal, StopLocation = new Position { Latitude = stop.Lat, Longitude = stop.Lon } - }); + }; + + await _pipeline.ExecuteAsync(context); var feedId = id.Split(':')[0]; @@ -167,7 +169,8 @@ public partial class ArrivalsController : ControllerBase ContrastHelper.GetBestTextColour(r.Color ?? fallbackColor) : r.TextColor })], - Arrivals = [.. arrivals.Where(a => a.Estimate.Minutes >= timeThreshold)] + Arrivals = [.. arrivals.Where(a => a.Estimate.Minutes >= timeThreshold)], + Usage = context.Usage }); } |
