From e029a031050e08599f9d6d5fa654c17d985039c1 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Fri, 26 May 2023 21:07:48 +0200 Subject: expose sequence length of trip to onboard unit --- lib/Server.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/Server.hs b/lib/Server.hs index d6e9955..7ebaca5 100644 --- a/lib/Server.hs +++ b/lib/Server.hs @@ -107,6 +107,7 @@ server gtfs@GTFS{..} Metrics{..} subscribers dbpool settings = handleDebugAPI where mkJson :: Trip Deep Deep -> A.Value mkJson Trip {..} = A.object [ "trip" .= tripTripID + , "sequencelength" .= (stopSequence . V.last) tripStops , "stops" .= fmap (\Stop{..} -> A.object [ "departure" .= stopDeparture , "station" .= stationId stopStation -- cgit v1.2.3