aboutsummaryrefslogtreecommitdiff
path: root/lib/Persist.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Persist.hs')
-rw-r--r--lib/Persist.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Persist.hs b/lib/Persist.hs
index 769db2a..a8ed15e 100644
--- a/lib/Persist.hs
+++ b/lib/Persist.hs
@@ -99,7 +99,7 @@ TrainAnchor json sql=tt_trip_anchor
sequence Double
delay Seconds
msg Text Maybe
- deriving Show Generic Eq ToSchema
+ deriving Show Generic Eq
-- TODO: multi-language support?
Announcement json sql=tt_announcements
@@ -110,7 +110,7 @@ Announcement json sql=tt_announcements
day Day
url Text Maybe
announcedAt UTCTime Maybe
- deriving Generic ToSchema Show
+ deriving Generic Show
-- | this table works as calendar_dates.txt in GTFS
ScheduleAmendment json sql=tt_schedule_amendement
@@ -125,6 +125,10 @@ instance ToSchema RunningId where
declareNamedSchema _ = declareNamedSchema (Proxy @UUID)
instance ToSchema TrainPing where
declareNamedSchema = genericDeclareNamedSchema (swaggerOptions "trainPing")
+instance ToSchema TrainAnchor where
+ declareNamedSchema = genericDeclareNamedSchema (swaggerOptions "trainAnchor")
+instance ToSchema Announcement where
+ declareNamedSchema = genericDeclareNamedSchema (swaggerOptions "announcement")
runSql :: MonadIO m => Pool SqlBackend -> ReaderT SqlBackend (NoLoggingT (ResourceT IO)) a -> m a
runSql pool = liftIO . flip runSqlPersistMPool pool