From 9b9e6934f74f8f1a95cdf4c22b57770d62091aea Mon Sep 17 00:00:00 2001 From: stuebinm Date: Mon, 12 Dec 2022 01:36:59 +0100 Subject: a subscribe websocket for real-time location info (for a leaflet map view or sth which isn't implemented yet) --- lib/API.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/API.hs') diff --git a/lib/API.hs b/lib/API.hs index 70971c3..3e29249 100644 --- a/lib/API.hs +++ b/lib/API.hs @@ -61,6 +61,7 @@ type API = "stations" :> Get '[JSON] (Map StationID Station) -- TODO: perhaps a websocket instead? :<|> "train" :> "ping" :> ReqBody '[JSON] TrainPing :> Post '[JSON] (Maybe TrainAnchor) :<|> "train" :> "ping" :> "ws" :> WebSocket + :<|> "train" :> "subscribe" :> Capture "Trip ID" TripID :> WebSocket -- debug things :<|> "debug" :> "pings" :> Get '[JSON] (Map Token [TrainPing]) :<|> "debug" :> "pings" :> Capture "Trip ID" TripID :> Capture "day" Day :> Get '[JSON] [TrainPing] -- cgit v1.2.3