From 5f27e441f47f2565b941b321a9939d54357e1654 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Thu, 16 Apr 2026 01:23:50 +0200 Subject: meta: reorganisation, rename "token" to "trackerId" --- lib/Server/Subscribe.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Server/Subscribe.hs') diff --git a/lib/Server/Subscribe.hs b/lib/Server/Subscribe.hs index 8559659..5b0edb5 100644 --- a/lib/Server/Subscribe.hs +++ b/lib/Server/Subscribe.hs @@ -37,9 +37,9 @@ handleSubscribe dbpool subscribers (ticketId :: UUID) conn = liftIO $ WS.withPin -- send most recent ping, if any (so we won't have to wait for movement) runSqlWithoutLog dbpool (selectOne do - ping <- from (table @TrainPing) - where_ (ping ^. TrainPingTicket ==. val (coerce ticketId)) - orderBy [desc (ping ^. TrainPingTimestamp)] + ping <- from (table @Ping) + where_ (ping ^. PingTicket ==. val (Just (coerce ticketId))) + orderBy [desc (ping ^. PingTimestamp)] pure ping) <&> fmap entityVal >>= flip whenJust (WS.sendTextData conn . A.encode) -- cgit v1.2.3