diff options
Diffstat (limited to '')
-rw-r--r-- | lib/Persist.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Persist.hs b/lib/Persist.hs index aa040cf..769db2a 100644 --- a/lib/Persist.hs +++ b/lib/Persist.hs @@ -87,7 +87,7 @@ TrainPing json sql=tt_trip_ping lat Double long Double timestamp UTCTime - deriving Show Generic Eq ToSchema + deriving Show Generic Eq -- status of a train somewhen in time (may be in the future), -- inferred from trainpings / entered via controlRoom @@ -123,6 +123,8 @@ ScheduleAmendment json sql=tt_schedule_amendement instance ToSchema RunningId where declareNamedSchema _ = declareNamedSchema (Proxy @UUID) +instance ToSchema TrainPing where + declareNamedSchema = genericDeclareNamedSchema (swaggerOptions "trainPing") runSql :: MonadIO m => Pool SqlBackend -> ReaderT SqlBackend (NoLoggingT (ResourceT IO)) a -> m a runSql pool = liftIO . flip runSqlPersistMPool pool |