diff options
author | stuebinm | 2023-05-20 00:13:35 +0200 |
---|---|---|
committer | stuebinm | 2023-05-20 00:13:47 +0200 |
commit | 965eb7097326bd28a7e5cb6c243c28e81cab4593 (patch) | |
tree | fb67d9d7655a11808758097a8e291acbff671930 /lib/Server | |
parent | bd81153b3be98e6c8d514b2bfdd731637d821414 (diff) |
expose the gtfs.zip used in the API
Diffstat (limited to 'lib/Server')
-rw-r--r-- | lib/Server/ControlRoom.hs | 6 | ||||
-rw-r--r-- | lib/Server/GTFS_RT.hs | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/Server/ControlRoom.hs b/lib/Server/ControlRoom.hs index 9cde587..8fef7f9 100644 --- a/lib/Server/ControlRoom.hs +++ b/lib/Server/ControlRoom.hs @@ -31,8 +31,8 @@ import qualified Data.Map as M import Data.Pool (Pool) import Data.Text (Text) import qualified Data.Text as T -import Data.Time (UTCTime (..), getCurrentTime, - utctDay, addDays) +import Data.Time (UTCTime (..), addDays, + getCurrentTime, utctDay) import Data.Time.Calendar (Day) import Data.Time.Format.ISO8601 (iso8601Show) import Data.UUID (UUID) @@ -194,7 +194,7 @@ getTrainsR = do (day, isToday) <- liftIO $ getCurrentTime <&> utctDay <&> \today -> case maybeDay of Just day -> (day, day == today) - Nothing -> (today, True) + Nothing -> (today, True) let prevday = (T.pack . iso8601Show . addDays (-1)) day let nextday = (T.pack . iso8601Show . addDays 1) day diff --git a/lib/Server/GTFS_RT.hs b/lib/Server/GTFS_RT.hs index 984e19d..5b485df 100644 --- a/lib/Server/GTFS_RT.hs +++ b/lib/Server/GTFS_RT.hs @@ -91,7 +91,8 @@ import Data.UUID (t import qualified Data.Vector as V import Extrapolation (Extrapolator (extrapolateAtPosition, extrapolateAtSeconds), LinearExtrapolator (..)) -import GTFS (Depth (..), showTimeWithSeconds) +import GTFS (Depth (..), + showTimeWithSeconds) import GTFS.Realtime.TripUpdate (TripUpdate (TripUpdate)) import Server.Util (Service, secondsNow) |