diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2026-04-04 15:44:41 +0200 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2026-04-04 15:44:41 +0200 |
| commit | 97908d274ee12eb2301fadd5fc445d0f79479a56 (patch) | |
| tree | 04eee0ad547cc68047011dea82549dcad4a0d0d8 /src/Enmarcha.Backend/Controllers/TileController.cs | |
| parent | 1b4f4a674ac533c0b51260ba35ab91dd2cf9486d (diff) | |
Enhance arrival and transit functionality with new vehicle operation logic and transit kind classification
Diffstat (limited to 'src/Enmarcha.Backend/Controllers/TileController.cs')
| -rw-r--r-- | src/Enmarcha.Backend/Controllers/TileController.cs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/Enmarcha.Backend/Controllers/TileController.cs b/src/Enmarcha.Backend/Controllers/TileController.cs index 5ef8dd6..b419dee 100644 --- a/src/Enmarcha.Backend/Controllers/TileController.cs +++ b/src/Enmarcha.Backend/Controllers/TileController.cs @@ -127,7 +127,7 @@ public class TileController : ControllerBase { "code", $"{idParts[0]}:{codeWithinFeed}" }, { "name", FeedService.NormalizeStopName(feedId, stop.Name) }, { "icon", GetIconNameForFeed(feedId) }, - { "transitKind", GetTransitKind(feedId) } + { "transitKind", TransitKindClassifier.StringByFeed(feedId) } } }; @@ -172,17 +172,6 @@ public class TileController : ControllerBase }; } - private string GetTransitKind(string feedId) - { - return feedId switch - { - "vitrasa" or "tussa" or "tranvias" or "shuttle" or "ourense" => "bus", - "xunta" => "coach", - "renfe" or "feve" => "train", - _ => "unknown" - }; - } - private List<StopTileResponse.Route> GetDistinctRoutes(string feedId, List<StopTileResponse.Route> routes) { List<StopTileResponse.Route> distinctRoutes = []; |
